Make scarpet internal and control flow exceptions stackless (#1392)

This commit is contained in:
altrisi authored and GitHub committed 2022-04-20 13:27:25 +02:00
1 parent 76861479e0
commit 80a5342776
5 files changed
+23 -4

No files matched your search

@@ -0,0 +1,19 @@
package carpet.script.exception;
/**
* A type of {@link RuntimeException} that doesn't spend time producing and filling a stacktrace
*/
abstract class StacklessRuntimeException extends RuntimeException {
public StacklessRuntimeException() {
super();
}
public StacklessRuntimeException(String message) {
super(message);
}
@Override
public Throwable fillInStackTrace() {
return this;
}
}