Create base class for DSL exceptions

This commit is contained in:
Riccardo Azzolini 2019-01-28 19:26:31 +01:00
parent 1304755c25
commit 1e0d2e5a0e

View File

@ -0,0 +1,16 @@
package it.cavallium.warppi.math.rules.dsl;
/**
* The superclass of all exceptions which represent errors in DSL code.
*/
public abstract class DslException extends Exception {
/**
* @return The index at which the error starts in the source string.
*/
public abstract int getPosition();
/**
* @return The length of the error in the source string.
*/
public abstract int getLength();
}