Package de.inetsoftware.jwebassembly
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.private
WasmException
(String message, Throwable cause) Create a new instance with a cause.private
WasmException
(Throwable cause) Create a new instance with a cause. -
Method Summary
Modifier and TypeMethodDescriptionstatic WasmException
Create a wrapped exception needed with an additional message.static WasmException
Create a wrapped exception needed.static WasmException
Create a wrapped exception needed.static WasmException
Create a wrapped exception needed.int
Get the line number in Java code on which the error occurred.Methods inherited from class java.lang.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
Create a new instance.- Parameters:
message
- the error messagesourceFile
- the sourceFile of the Java codeclassName
- the class name of the Java codelineNumber
- the line number in Java Code
-
WasmException
Create a new instance with a cause.- Parameters:
cause
- the cause
-
WasmException
Create a new instance with a cause.- Parameters:
message
- the detail messagecause
- the cause
-
-
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:
getMessage
in classThrowable
-