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:
java.io.Serializable
public class WasmException extends java.lang.RuntimeException
If there any error occur on converting a class file to a WebAssembly module.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
className
private int
lineNumber
private java.lang.String
methodName
private java.lang.String
sourceFile
-
Constructor Summary
Constructors Modifier Constructor Description WasmException(java.lang.String message, int lineNumber)
Create a new instance.WasmException(java.lang.String message, java.lang.String sourceFile, java.lang.String className, int lineNumber)
Create a new instance.private
WasmException(java.lang.String message, java.lang.Throwable cause)
Create a new instance with a cause.private
WasmException(java.lang.Throwable cause)
Create a new instance with a cause.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WasmException
create(java.lang.String message, java.lang.Throwable cause)
Create a wrapped exception needed with an additional message.static WasmException
create(java.lang.Throwable cause)
Create a wrapped exception needed.static WasmException
create(java.lang.Throwable cause, int lineNumber)
Create a wrapped exception needed.static WasmException
create(java.lang.Throwable cause, java.lang.String sourceFile, java.lang.String className, java.lang.String methodName, int lineNumber)
Create a wrapped exception needed.int
getLineNumber()
Get the line number in Java code on which the error occurred.java.lang.String
getMessage()
-
-
-
Constructor Detail
-
WasmException
public WasmException(java.lang.String message, int lineNumber)
Create a new instance.- Parameters:
message
- the error messagelineNumber
- the line number in Java Code
-
WasmException
public WasmException(java.lang.String message, java.lang.String sourceFile, java.lang.String className, int lineNumber)
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
private WasmException(java.lang.Throwable cause)
Create a new instance with a cause.- Parameters:
cause
- the cause
-
WasmException
private WasmException(java.lang.String message, java.lang.Throwable cause)
Create a new instance with a cause.- Parameters:
message
- the detail messagecause
- the cause
-
-
Method Detail
-
create
public static WasmException create(java.lang.Throwable cause, int lineNumber)
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(java.lang.Throwable cause, java.lang.String sourceFile, java.lang.String className, java.lang.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
public static WasmException create(java.lang.Throwable cause)
Create a wrapped exception needed.- Parameters:
cause
- the wrapped cause- Returns:
- a new instance
-
create
public static WasmException create(java.lang.String message, java.lang.Throwable cause)
Create a wrapped exception needed with an additional message.- Parameters:
cause
- the wrapped causemessage
- the message- 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
public java.lang.String getMessage()
- Overrides:
getMessage
in classjava.lang.Throwable
-
-