OpenCores
URL https://opencores.org/ocsvn/usb_fpga_2_14/usb_fpga_2_14/trunk

Subversion Repositories usb_fpga_2_14

[/] [usb_fpga_2_14/] [trunk/] [java/] [ztex/] [InvalidFirmwareException.java] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ZTEX
/*%
2
   Java host software API of ZTEX SDK
3
   Copyright (C) 2009-2017 ZTEX GmbH.
4
   http://www.ztex.de
5
 
6
   This Source Code Form is subject to the terms of the Mozilla Public
7
   License, v. 2.0. If a copy of the MPL was not distributed with this file,
8
   You can obtain one at http://mozilla.org/MPL/2.0/.
9
 
10
   Alternatively, the contents of this file may be used under the terms
11
   of the GNU General Public License Version 3, as described below:
12
 
13
   This program is free software; you can redistribute it and/or modify
14
   it under the terms of the GNU General Public License version 3 as
15
   published by the Free Software Foundation.
16
 
17
   This program is distributed in the hope that it will be useful, but
18
   WITHOUT ANY WARRANTY; without even the implied warranty of
19
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
   General Public License for more details.
21
 
22
   You should have received a copy of the GNU General Public License
23
   along with this program; if not, see http://www.gnu.org/licenses/.
24
%*/
25
 
26
package ztex;
27
 
28
import org.usb4java.*;
29
 
30
/**
31
  * Thrown if a device runs with no or the wrong firmware, i.e. if the ZTEX descriptor is not found or damaged. */
32
public class InvalidFirmwareException extends Exception {
33
/**
34
 * Constructs an instance from the error message.
35
 * @param msg The error message.
36
 */
37
    public InvalidFirmwareException ( String msg) {
38
        super( msg );
39
    }
40
 
41
/**
42
 * Constructs an instance from the given device and error message.
43
 * @param ztex The device.
44
 * @param msg The error message.
45
 */
46
    public InvalidFirmwareException ( Ztex1 ztex, String msg) {
47
        this( ztex.dev().dev(), msg );
48
    }
49
 
50
/**
51
 * Constructs an instance from the given device and error message.
52
 * @param dev The device.
53
 * @param msg The error message.
54
 */
55
    public InvalidFirmwareException ( ZtexDevice1 dev, String msg) {
56
        this( dev.name() + ": " + msg );
57
    }
58
 
59
/**
60
 * Constructs an instance from the given device and error message.
61
 * @param dev The device.
62
 * @param msg The error message.
63
 */
64
    public InvalidFirmwareException (Device dev, String msg) {
65
        super( ZtexDevice1.name(dev) + ": Invalid Firmware: "+ msg );
66
    }
67
 
68
/**
69
 * Constructs an instance from the given device and error message.
70
 * @param ztex The device.
71
 */
72
    public InvalidFirmwareException ( Ztex1 ztex ) {
73
        this( ztex.dev().name() + ": Invalif Firmware" );
74
    }
75
 
76
/**
77
 * Constructs an instance from the given device and error message.
78
 * @param dev The device.
79
 */
80
    public InvalidFirmwareException ( ZtexDevice1 dev ) {
81
        this( dev.dev() );
82
    }
83
 
84
/**
85
 * Constructs an instance from the given device and error message.
86
 * @param dev The device.
87
 */
88
    public InvalidFirmwareException (Device dev ) {
89
        super( ZtexDevice1.name(dev) + ": Invalid Firmware" );
90
    }
91
 
92
 
93
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.