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

Subversion Repositories usb_fpga_1_11

[/] [usb_fpga_1_11/] [trunk/] [java/] [ztex/] [InvalidFirmwareException.java] - Blame information for rev 9

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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