Throw the right exception
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4666 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
ac52b64b77
commit
82f9327b5e
|
|
@ -120,7 +120,7 @@ public class Tranche implements Comparable<Tranche> {
|
|||
if ( bindings.containsKey(key) )
|
||||
return Double.valueOf(bindings.get(key));
|
||||
else if ( required ) {
|
||||
throw new UserException("Malformed tranches file. Missing required key " + key);
|
||||
throw new UserException.MalformedFile("Malformed tranches file. Missing required key " + key);
|
||||
}
|
||||
else
|
||||
return -1;
|
||||
|
|
@ -130,7 +130,7 @@ public class Tranche implements Comparable<Tranche> {
|
|||
if ( bindings.containsKey(key) )
|
||||
return Integer.valueOf(bindings.get(key));
|
||||
else if ( required ) {
|
||||
throw new UserException("Malformed tranches file. Missing required key " + key);
|
||||
throw new UserException.MalformedFile("Malformed tranches file. Missing required key " + key);
|
||||
}
|
||||
else
|
||||
return -1;
|
||||
|
|
@ -177,4 +177,4 @@ public class Tranche implements Comparable<Tranche> {
|
|||
throw new UserException.CouldNotReadInputFile(f, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue