RubyException
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized Throwable | initCause(Throwable
the cause (which is saved for later retrieval by the
cause)getCause() method). (A null value is
permitted, and indicates that the cause is nonexistent or
unknown.)Overrides java. Initializes the cause of this throwable to the specified value. |
| Exception | back to summary |
|---|---|
| public Exception(String message, RubyException exception) | |
| initCause | back to summary |
|---|---|
| public synchronized Throwable initCause(Throwable cause) Overrides java. Doc from java. Initializes the cause of this throwable to the specified value. (The cause is the throwable that caused this throwable to get thrown.) This method can be called at most once. It is generally called from
within the constructor, or immediately after creating the
throwable. If this throwable was created
with An example of using this method on a legacy throwable type without other support for setting the cause is:
try {
lowLevelOp();
} catch (LowLevelException le) {
throw (HighLevelException)
new HighLevelException().initCause(le); // Legacy constructor
}
| |