Skip to content
Snippets Groups Projects
Commit 1f682c78 authored by Mikaël Mayer's avatar Mikaël Mayer
Browse files

hot fix: RuntimeException instead of RuntimeError

parent 0c458b7a
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ public class StrOps { ...@@ -14,7 +14,7 @@ public class StrOps {
public static String substring(String a, BigInt start, BigInt end) { public static String substring(String a, BigInt start, BigInt end) {
if (start.greaterEquals(end) || start.greaterEquals(length(a)) if (start.greaterEquals(end) || start.greaterEquals(length(a))
|| end.lessEquals(new BigInt("0"))) || end.lessEquals(new BigInt("0")))
throw new RuntimeError("Invalid substring indices : " + start + ", " + end + " for string \""+a+"\""); throw new RuntimeException("Invalid substring indices : " + start + ", " + end + " for string \""+a+"\"");
else else
return a.substring(start.underlying().intValue(), end.underlying() return a.substring(start.underlying().intValue(), end.underlying()
.intValue()); .intValue());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment