Class WasmException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
de.inetsoftware.jwebassembly.WasmException
- All Implemented Interfaces:
Serializable
If there any error occur on converting a class file to a WebAssembly module.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionWasmException(String message, int lineNumber) Create a new instance.WasmException(String message, String sourceFile, String className, int lineNumber) Create a new instance.privateWasmException(String message, Throwable cause) Create a new instance with a cause.privateWasmException(Throwable cause) Create a new instance with a cause. -
Method Summary
Modifier and TypeMethodDescriptionstatic WasmExceptionCreate a wrapped exception needed with an additional message.static WasmExceptionCreate a wrapped exception needed.static WasmExceptionCreate a wrapped exception needed.static WasmExceptionCreate a wrapped exception needed.intGet the line number in Java code on which the error occurred.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
lineNumber
private int lineNumber -
sourceFile
-
className
-
methodName
-
-
Constructor Details
-
WasmException
Create a new instance.- Parameters:
message- the error messagelineNumber- the line number in Java Code
-
WasmException
-
WasmException
Create a new instance with a cause.- Parameters:
cause- the cause
-
WasmException
-
-
Method Details
-
create
Create a wrapped exception needed.- Parameters:
cause- the wrapped causelineNumber- the line number in Java Code- Returns:
- a new instance
-
create
public static WasmException create(Throwable cause, String sourceFile, String className, String methodName, int lineNumber) Create a wrapped exception needed.- Parameters:
cause- the wrapped causesourceFile- the source file of the Java codeclassName- the class name of the Java codemethodName- the method of the Java codelineNumber- the line number in Java Code- Returns:
- a new instance
-
create
Create a wrapped exception needed.- Parameters:
cause- the wrapped cause- Returns:
- a new instance
-
create
Create a wrapped exception needed with an additional message.- Parameters:
message- the messagecause- the wrapped cause- Returns:
- a new instance
-
getLineNumber
public int getLineNumber()Get the line number in Java code on which the error occurred.- Returns:
- the line number or -1
-
getMessage
- Overrides:
getMessagein classThrowable
-