forked from bwaldvogel/liblinear-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInvalidInputDataException.java
More file actions
57 lines (42 loc) · 1.36 KB
/
InvalidInputDataException.java
File metadata and controls
57 lines (42 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package liblinear;
import java.io.File;
public class InvalidInputDataException extends Exception {
private static final long serialVersionUID = 2945131732407207308L;
private final int _line;
private File _file;
public InvalidInputDataException( String message, File file, int line ) {
super(message);
_file = file;
_line = line;
}
public InvalidInputDataException( String message, String filename, int line ) {
this(message, new File(filename), line);
}
public InvalidInputDataException( String message, File file, int lineNr, NumberFormatException cause ) {
super(message, cause);
_file = file;
_line = lineNr;
}
public InvalidInputDataException( String message, String filename, int lineNr, NumberFormatException cause ) {
this(message, new File(filename), lineNr, cause);
}
public File getFile() {
return _file;
}
/**
* This methods returns the path of the file.
* The method name might be misleading.
*
* @deprecated use {@link #getFile()} instead
*/
public String getFilename() {
return _file.getPath();
}
public int getLine() {
return _line;
}
@Override
public String toString() {
return super.toString() + " (" + _file + ":" + _line + ")";
}
}