diff --git a/modules/main/src/main/java/com/annimon/ownlang/modules/date/date.java b/modules/main/src/main/java/com/annimon/ownlang/modules/date/date.java index 6642410..95a18f6 100644 --- a/modules/main/src/main/java/com/annimon/ownlang/modules/date/date.java +++ b/modules/main/src/main/java/com/annimon/ownlang/modules/date/date.java @@ -1,5 +1,6 @@ package com.annimon.ownlang.modules.date; +import com.annimon.ownlang.exceptions.OwnLangRuntimeException; import com.annimon.ownlang.exceptions.TypeException; import com.annimon.ownlang.lib.*; import com.annimon.ownlang.modules.Module; @@ -274,7 +275,7 @@ public final class date implements Module { try { return DateValue.from(format.parse(args[0].asString())); } catch (ParseException ex) { - throw new RuntimeException(ex); + throw new OwnLangRuntimeException(ex); } } } diff --git a/modules/main/src/main/java/com/annimon/ownlang/modules/forms/JTextAreaValue.java b/modules/main/src/main/java/com/annimon/ownlang/modules/forms/JTextAreaValue.java index 083ac4b..b791761 100644 --- a/modules/main/src/main/java/com/annimon/ownlang/modules/forms/JTextAreaValue.java +++ b/modules/main/src/main/java/com/annimon/ownlang/modules/forms/JTextAreaValue.java @@ -1,5 +1,6 @@ package com.annimon.ownlang.modules.forms; +import com.annimon.ownlang.exceptions.OwnLangRuntimeException; import com.annimon.ownlang.lib.Arguments; import static com.annimon.ownlang.lib.Converters.*; import com.annimon.ownlang.lib.FunctionValue; @@ -55,7 +56,7 @@ public class JTextAreaValue extends JTextComponentValue { int result = f.accept(args[0].asInt()); return NumberValue.of(result); } catch (BadLocationException ex) { - throw new RuntimeException(ex); + throw new OwnLangRuntimeException(ex); } }); } diff --git a/modules/main/src/main/java/com/annimon/ownlang/modules/gzip/gzip.java b/modules/main/src/main/java/com/annimon/ownlang/modules/gzip/gzip.java index 323b4df..df6aff4 100644 --- a/modules/main/src/main/java/com/annimon/ownlang/modules/gzip/gzip.java +++ b/modules/main/src/main/java/com/annimon/ownlang/modules/gzip/gzip.java @@ -1,5 +1,6 @@ package com.annimon.ownlang.modules.gzip; +import com.annimon.ownlang.exceptions.OwnLangRuntimeException; import com.annimon.ownlang.exceptions.TypeException; import com.annimon.ownlang.lib.*; import com.annimon.ownlang.modules.Module; @@ -45,7 +46,7 @@ public class gzip implements Module { gzos.finish(); return NumberValue.ONE; } catch (IOException ex) { - throw new RuntimeException("gzipFile", ex); + throw new OwnLangRuntimeException("gzipFile", ex); } } @@ -63,7 +64,7 @@ public class gzip implements Module { gzos.finish(); return ArrayValue.of(baos.toByteArray()); } catch (IOException ex) { - throw new RuntimeException("gzipBytes", ex); + throw new OwnLangRuntimeException("gzipBytes", ex); } } @@ -85,7 +86,7 @@ public class gzip implements Module { copy(gzis, os); return NumberValue.ONE; } catch (IOException ex) { - throw new RuntimeException("ungzipFile", ex); + throw new OwnLangRuntimeException("ungzipFile", ex); } } @@ -102,7 +103,7 @@ public class gzip implements Module { copy(gzis, baos); return ArrayValue.of(baos.toByteArray()); } catch (IOException ex) { - throw new RuntimeException("ungzipBytes", ex); + throw new OwnLangRuntimeException("ungzipBytes", ex); } } diff --git a/modules/main/src/main/java/com/annimon/ownlang/modules/java/java.java b/modules/main/src/main/java/com/annimon/ownlang/modules/java/java.java index a2f6953..059f405 100644 --- a/modules/main/src/main/java/com/annimon/ownlang/modules/java/java.java +++ b/modules/main/src/main/java/com/annimon/ownlang/modules/java/java.java @@ -1,5 +1,6 @@ package com.annimon.ownlang.modules.java; +import com.annimon.ownlang.exceptions.OwnLangRuntimeException; import com.annimon.ownlang.lib.*; import com.annimon.ownlang.modules.Module; import java.lang.reflect.Array; @@ -245,7 +246,7 @@ public final class java implements Module { try { return new ClassValue(Class.forName(className)); } catch (ClassNotFoundException ce) { - throw new RuntimeException("Class " + className + " not found.", ce); + throw new OwnLangRuntimeException("Class " + className + " not found.", ce); } } @@ -307,7 +308,7 @@ public final class java implements Module { // skip } } - throw new RuntimeException("Constructor for " + args.length + " arguments" + throw new OwnLangRuntimeException("Constructor for " + args.length + " arguments" + " not found or non accessible"); } @@ -327,7 +328,7 @@ public final class java implements Module { } } final String className = (object == null ? "null" : object.getClass().getName()); - throw new RuntimeException("Method for " + args.length + " arguments" + throw new OwnLangRuntimeException("Method for " + args.length + " arguments" + " not found or non accessible in " + className); }; } diff --git a/modules/main/src/main/java/com/annimon/ownlang/modules/jdbc/jdbc.java b/modules/main/src/main/java/com/annimon/ownlang/modules/jdbc/jdbc.java index 165eec7..f2cef93 100644 --- a/modules/main/src/main/java/com/annimon/ownlang/modules/jdbc/jdbc.java +++ b/modules/main/src/main/java/com/annimon/ownlang/modules/jdbc/jdbc.java @@ -1,6 +1,7 @@ package com.annimon.ownlang.modules.jdbc; import com.annimon.ownlang.exceptions.ArgumentsMismatchException; +import com.annimon.ownlang.exceptions.OwnLangRuntimeException; import com.annimon.ownlang.lib.*; import com.annimon.ownlang.modules.Module; import java.io.IOException; @@ -99,7 +100,7 @@ public final class jdbc implements Module { throw new ArgumentsMismatchException("Wrong number of arguments"); } } catch (Exception ex) { - throw new RuntimeException(ex); + throw new OwnLangRuntimeException(ex); } }; } @@ -161,7 +162,7 @@ public final class jdbc implements Module { throw new ArgumentsMismatchException("Wrong number of arguments"); } } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } } @@ -186,7 +187,7 @@ public final class jdbc implements Module { throw new ArgumentsMismatchException("Wrong number of arguments"); } } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } } @@ -284,7 +285,7 @@ public final class jdbc implements Module { try { return new URL(args[1].asString()); } catch (IOException ioe) { - throw new RuntimeException(ioe); + throw new OwnLangRuntimeException(ioe); } })); } @@ -298,7 +299,7 @@ public final class jdbc implements Module { else statement.addBatch(args[0].asString()); return NumberValue.ONE; } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } } @@ -316,7 +317,7 @@ public final class jdbc implements Module { (String[] columnNames) -> statement.execute(sql, columnNames)); return NumberValue.fromBoolean(result); } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } } @@ -345,7 +346,7 @@ public final class jdbc implements Module { (String[] columnNames) -> statement.executeUpdate(sql, columnNames)); return NumberValue.of(rowCount); } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } } @@ -363,7 +364,7 @@ public final class jdbc implements Module { (String[] columnNames) -> statement.executeLargeUpdate(sql, columnNames)); return NumberValue.of(rowCount); } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } } } @@ -463,7 +464,7 @@ public final class jdbc implements Module { try { return NumberValue.of(rs.findColumn(args[0].asString())); } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } } @@ -476,7 +477,7 @@ public final class jdbc implements Module { rs.updateNull(args[0].asString()); return NumberValue.ONE; } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } } } @@ -514,7 +515,7 @@ public final class jdbc implements Module { return columnNamesFunction.apply(columnNames); } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } } @@ -539,7 +540,7 @@ public final class jdbc implements Module { result.execute(); return NumberValue.ONE; } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } }); } @@ -551,7 +552,7 @@ public final class jdbc implements Module { result.execute(args[0].asInt()); return NumberValue.ONE; } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } }); } @@ -561,7 +562,7 @@ public final class jdbc implements Module { try { return NumberValue.fromBoolean(result.get()); } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } }); } @@ -571,7 +572,7 @@ public final class jdbc implements Module { try { return NumberValue.of(numberResult.get()); } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } }); } @@ -581,7 +582,7 @@ public final class jdbc implements Module { try { return new StringValue(stringResult.get()); } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } }); } @@ -591,7 +592,7 @@ public final class jdbc implements Module { try { return converter.apply(objectResult.get()); } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } }); } @@ -606,7 +607,7 @@ public final class jdbc implements Module { } return NumberValue.fromBoolean(stringResult.get(args[0].asString())); } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } }); } @@ -620,7 +621,7 @@ public final class jdbc implements Module { } return NumberValue.of(stringResult.get(args[0].asString())); } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } }); } @@ -634,7 +635,7 @@ public final class jdbc implements Module { } return new StringValue(stringResult.get(args[0].asString())); } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } }); } @@ -649,7 +650,7 @@ public final class jdbc implements Module { } return converter.apply(stringResult.get(args[0].asString())); } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } }); } @@ -664,7 +665,7 @@ public final class jdbc implements Module { } return converter.apply(stringResult.get(args[0].asString()), args); } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } }); } @@ -676,7 +677,7 @@ public final class jdbc implements Module { result.execute(converter.apply(args)); return NumberValue.ONE; } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } }); } @@ -688,7 +689,7 @@ public final class jdbc implements Module { numberResult.execute(args[0].asInt(), converter.apply(args)); return NumberValue.ONE; } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } }); } @@ -705,7 +706,7 @@ public final class jdbc implements Module { } return NumberValue.ONE; } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } }); } @@ -728,7 +729,7 @@ public final class jdbc implements Module { } return new ResultSetValue(result); } catch (SQLException sqlex) { - throw new RuntimeException(sqlex); + throw new OwnLangRuntimeException(sqlex); } } diff --git a/modules/main/src/main/java/com/annimon/ownlang/modules/json/json_decode.java b/modules/main/src/main/java/com/annimon/ownlang/modules/json/json_decode.java index 5522c8e..d0f96ce 100644 --- a/modules/main/src/main/java/com/annimon/ownlang/modules/json/json_decode.java +++ b/modules/main/src/main/java/com/annimon/ownlang/modules/json/json_decode.java @@ -1,5 +1,6 @@ package com.annimon.ownlang.modules.json; +import com.annimon.ownlang.exceptions.OwnLangRuntimeException; import com.annimon.ownlang.lib.Arguments; import com.annimon.ownlang.lib.Function; import com.annimon.ownlang.lib.Value; @@ -17,7 +18,7 @@ public final class json_decode implements Function { final Object root = new JSONTokener(jsonRaw).nextValue(); return ValueUtils.toValue(root); } catch (JSONException ex) { - throw new RuntimeException("Error while parsing json", ex); + throw new OwnLangRuntimeException("Error while parsing json", ex); } } } diff --git a/modules/main/src/main/java/com/annimon/ownlang/modules/json/json_encode.java b/modules/main/src/main/java/com/annimon/ownlang/modules/json/json_encode.java index a7b4e64..53c7c8a 100644 --- a/modules/main/src/main/java/com/annimon/ownlang/modules/json/json_encode.java +++ b/modules/main/src/main/java/com/annimon/ownlang/modules/json/json_encode.java @@ -1,5 +1,6 @@ package com.annimon.ownlang.modules.json; +import com.annimon.ownlang.exceptions.OwnLangRuntimeException; import com.annimon.ownlang.lib.Arguments; import com.annimon.ownlang.lib.ArrayValue; import com.annimon.ownlang.lib.Function; @@ -36,7 +37,7 @@ public final class json_encode implements Function { return new StringValue(jsonRaw); } catch (JSONException ex) { - throw new RuntimeException("Error while creating json", ex); + throw new OwnLangRuntimeException("Error while creating json", ex); } } diff --git a/modules/main/src/main/java/com/annimon/ownlang/modules/okhttp/CallValue.java b/modules/main/src/main/java/com/annimon/ownlang/modules/okhttp/CallValue.java index c9452ba..95d3073 100644 --- a/modules/main/src/main/java/com/annimon/ownlang/modules/okhttp/CallValue.java +++ b/modules/main/src/main/java/com/annimon/ownlang/modules/okhttp/CallValue.java @@ -1,5 +1,6 @@ package com.annimon.ownlang.modules.okhttp; +import com.annimon.ownlang.exceptions.OwnLangRuntimeException; import com.annimon.ownlang.lib.Arguments; import com.annimon.ownlang.lib.Converters; import com.annimon.ownlang.lib.Function; @@ -56,7 +57,7 @@ public class CallValue extends MapValue { try { return new ResponseValue(call.execute()); } catch (IOException e) { - throw new RuntimeException(e); + throw new OwnLangRuntimeException(e); } } } diff --git a/modules/main/src/main/java/com/annimon/ownlang/modules/okhttp/ResponseBodyValue.java b/modules/main/src/main/java/com/annimon/ownlang/modules/okhttp/ResponseBodyValue.java index 79dc95e..495b493 100644 --- a/modules/main/src/main/java/com/annimon/ownlang/modules/okhttp/ResponseBodyValue.java +++ b/modules/main/src/main/java/com/annimon/ownlang/modules/okhttp/ResponseBodyValue.java @@ -1,6 +1,7 @@ package com.annimon.ownlang.modules.okhttp; import com.annimon.ownlang.Console; +import com.annimon.ownlang.exceptions.OwnLangRuntimeException; import com.annimon.ownlang.lib.Arguments; import com.annimon.ownlang.lib.ArrayValue; import com.annimon.ownlang.lib.Converters; @@ -27,7 +28,7 @@ public class ResponseBodyValue extends MapValue { try { return ArrayValue.of(responseBody.bytes()); } catch (IOException e) { - throw new RuntimeException(e); + throw new OwnLangRuntimeException(e); } }); set("close", Converters.voidToVoid(responseBody::close)); @@ -37,7 +38,7 @@ public class ResponseBodyValue extends MapValue { try { return new StringValue(responseBody.string()); } catch (IOException e) { - throw new RuntimeException(e); + throw new OwnLangRuntimeException(e); } }); set("file", args -> { @@ -48,7 +49,7 @@ public class ResponseBodyValue extends MapValue { sink.close(); return NumberValue.ONE; } catch (IOException e) { - throw new RuntimeException(e); + throw new OwnLangRuntimeException(e); } }); } diff --git a/modules/main/src/main/java/com/annimon/ownlang/modules/robot/robot.java b/modules/main/src/main/java/com/annimon/ownlang/modules/robot/robot.java index f82a916..b97603c 100644 --- a/modules/main/src/main/java/com/annimon/ownlang/modules/robot/robot.java +++ b/modules/main/src/main/java/com/annimon/ownlang/modules/robot/robot.java @@ -72,7 +72,7 @@ public final class robot implements Module { awtRobot = new Robot(); return true; } catch (AWTException awte) { - //throw new RuntimeException("Unable to create robot instance", awte); + //throw new OwnLangRuntimeException("Unable to create robot instance", awte); return false; } } diff --git a/modules/main/src/main/java/com/annimon/ownlang/modules/std/ArrayFunctions.java b/modules/main/src/main/java/com/annimon/ownlang/modules/std/ArrayFunctions.java index b569289..0bae4ca 100644 --- a/modules/main/src/main/java/com/annimon/ownlang/modules/std/ArrayFunctions.java +++ b/modules/main/src/main/java/com/annimon/ownlang/modules/std/ArrayFunctions.java @@ -1,5 +1,6 @@ package com.annimon.ownlang.modules.std; +import com.annimon.ownlang.exceptions.OwnLangRuntimeException; import com.annimon.ownlang.exceptions.TypeException; import com.annimon.ownlang.lib.Arguments; import com.annimon.ownlang.lib.ArrayValue; @@ -23,7 +24,7 @@ public final class ArrayFunctions { try { return new StringValue(new String(bytes, charset)); } catch (UnsupportedEncodingException uee) { - throw new RuntimeException(uee); + throw new OwnLangRuntimeException(uee); } } } diff --git a/modules/main/src/main/java/com/annimon/ownlang/modules/std/StringFunctions.java b/modules/main/src/main/java/com/annimon/ownlang/modules/std/StringFunctions.java index 774bd60..b89de09 100644 --- a/modules/main/src/main/java/com/annimon/ownlang/modules/std/StringFunctions.java +++ b/modules/main/src/main/java/com/annimon/ownlang/modules/std/StringFunctions.java @@ -1,5 +1,6 @@ package com.annimon.ownlang.modules.std; +import com.annimon.ownlang.exceptions.OwnLangRuntimeException; import com.annimon.ownlang.lib.Arguments; import com.annimon.ownlang.lib.ArrayValue; import com.annimon.ownlang.lib.NumberValue; @@ -17,7 +18,7 @@ public final class StringFunctions { try { return ArrayValue.of(args[0].asString().getBytes(charset)); } catch (UnsupportedEncodingException uee) { - throw new RuntimeException(uee); + throw new OwnLangRuntimeException(uee); } } diff --git a/modules/main/src/main/java/com/annimon/ownlang/modules/std/std_sync.java b/modules/main/src/main/java/com/annimon/ownlang/modules/std/std_sync.java index 5aa961c..2c91c82 100644 --- a/modules/main/src/main/java/com/annimon/ownlang/modules/std/std_sync.java +++ b/modules/main/src/main/java/com/annimon/ownlang/modules/std/std_sync.java @@ -1,5 +1,6 @@ package com.annimon.ownlang.modules.std; +import com.annimon.ownlang.exceptions.OwnLangRuntimeException; import com.annimon.ownlang.lib.Arguments; import com.annimon.ownlang.lib.Function; import com.annimon.ownlang.lib.FunctionValue; @@ -31,7 +32,7 @@ public final class std_sync implements Function { return queue.take(); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); - throw new RuntimeException(ex); + throw new OwnLangRuntimeException(ex); } } diff --git a/modules/main/src/main/java/com/annimon/ownlang/modules/yaml/yaml_decode.java b/modules/main/src/main/java/com/annimon/ownlang/modules/yaml/yaml_decode.java index d69c360..5952984 100644 --- a/modules/main/src/main/java/com/annimon/ownlang/modules/yaml/yaml_decode.java +++ b/modules/main/src/main/java/com/annimon/ownlang/modules/yaml/yaml_decode.java @@ -1,5 +1,6 @@ package com.annimon.ownlang.modules.yaml; +import com.annimon.ownlang.exceptions.OwnLangRuntimeException; import com.annimon.ownlang.lib.*; import java.util.LinkedHashMap; import java.util.List; @@ -21,7 +22,7 @@ public final class yaml_decode implements Function { final Object root = new Yaml(options).load(yamlRaw); return process(root); } catch (Exception ex) { - throw new RuntimeException("Error while parsing yaml", ex); + throw new OwnLangRuntimeException("Error while parsing yaml", ex); } } diff --git a/modules/main/src/main/java/com/annimon/ownlang/modules/yaml/yaml_encode.java b/modules/main/src/main/java/com/annimon/ownlang/modules/yaml/yaml_encode.java index faccc2a..3005e9c 100644 --- a/modules/main/src/main/java/com/annimon/ownlang/modules/yaml/yaml_encode.java +++ b/modules/main/src/main/java/com/annimon/ownlang/modules/yaml/yaml_encode.java @@ -1,5 +1,6 @@ package com.annimon.ownlang.modules.yaml; +import com.annimon.ownlang.exceptions.OwnLangRuntimeException; import com.annimon.ownlang.lib.*; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -22,7 +23,7 @@ public final class yaml_encode implements Function { final String yamlRaw = new Yaml(options).dump(root); return new StringValue(yamlRaw); } catch (Exception ex) { - throw new RuntimeException("Error while creating yaml", ex); + throw new OwnLangRuntimeException("Error while creating yaml", ex); } } diff --git a/modules/main/src/main/java/com/annimon/ownlang/modules/zip/zip.java b/modules/main/src/main/java/com/annimon/ownlang/modules/zip/zip.java index fdaacbd..5000d47 100644 --- a/modules/main/src/main/java/com/annimon/ownlang/modules/zip/zip.java +++ b/modules/main/src/main/java/com/annimon/ownlang/modules/zip/zip.java @@ -1,5 +1,6 @@ package com.annimon.ownlang.modules.zip; +import com.annimon.ownlang.exceptions.OwnLangRuntimeException; import com.annimon.ownlang.exceptions.TypeException; import com.annimon.ownlang.lib.*; import com.annimon.ownlang.modules.Module; @@ -98,7 +99,7 @@ public class zip implements Module { } } } catch (IOException ex) { - throw new RuntimeException("zip files", ex); + throw new OwnLangRuntimeException("zip files", ex); } return NumberValue.of(count); } @@ -193,7 +194,7 @@ public class zip implements Module { } zis.closeEntry(); } catch (IOException ex) { - throw new RuntimeException("unzip files", ex); + throw new OwnLangRuntimeException("unzip files", ex); } return NumberValue.of(count); } @@ -261,7 +262,7 @@ public class zip implements Module { } zis.closeEntry(); } catch (IOException ex) { - throw new RuntimeException("list zip entries", ex); + throw new OwnLangRuntimeException("list zip entries", ex); } return entries.toArray(new String[0]); } diff --git a/ownlang-core/src/main/java/com/annimon/ownlang/exceptions/OwnLangRuntimeException.java b/ownlang-core/src/main/java/com/annimon/ownlang/exceptions/OwnLangRuntimeException.java index b353fc0..83159a6 100644 --- a/ownlang-core/src/main/java/com/annimon/ownlang/exceptions/OwnLangRuntimeException.java +++ b/ownlang-core/src/main/java/com/annimon/ownlang/exceptions/OwnLangRuntimeException.java @@ -15,6 +15,11 @@ public class OwnLangRuntimeException extends RuntimeException implements SourceL this.range = null; } + public OwnLangRuntimeException(Exception ex) { + super(ex); + this.range = null; + } + public OwnLangRuntimeException(String message) { this(message, (Range) null); }