gvsig-scripting / org.gvsig.scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.lib / org.gvsig.scripting.lib.api / src / main / java / org / gvsig / scripting / ScriptingErrorException.java @ 650
History | View | Annotate | Download (1.02 KB)
1 |
/*
|
---|---|
2 |
* To change this license header, choose License Headers in Project Properties.
|
3 |
* To change this template file, choose Tools | Templates
|
4 |
* and open the template in the editor.
|
5 |
*/
|
6 |
package org.gvsig.scripting; |
7 |
|
8 |
import java.io.File; |
9 |
import org.apache.commons.io.FilenameUtils; |
10 |
|
11 |
/**
|
12 |
*
|
13 |
* @author jjdelcerro
|
14 |
*/
|
15 |
public class ScriptingErrorException extends RuntimeException { |
16 |
private static final long serialVersionUID = -3489829775437358107L; |
17 |
private final File name; |
18 |
private final int line; |
19 |
private final int column; |
20 |
|
21 |
public ScriptingErrorException(String msg, File name, int line, int column) { |
22 |
super(msg);
|
23 |
this.name = name;
|
24 |
this.line = line;
|
25 |
this.column = column;
|
26 |
} |
27 |
|
28 |
public int getLineNumber() { |
29 |
return this.line; |
30 |
} |
31 |
|
32 |
public int getColumnNumber() { |
33 |
return this.column; |
34 |
} |
35 |
|
36 |
public String getScriptName() { |
37 |
return FilenameUtils.getBaseName(this.name.getName()); |
38 |
} |
39 |
|
40 |
public File getScriptFile() { |
41 |
return this.name; |
42 |
} |
43 |
} |