All Downloads are FREE. Search and download functionalities are using the official Maven repository.

i.UncaughtException Maven / Gradle / Ivy

There is a newer version: 0.9.6
Show newest version
package i;

import foundation.icon.ee.types.Status;
import foundation.icon.ee.types.PredefinedException;

/**
 * Represent an exception which is generated by user's code but propagates to the AVM.
 */
public class UncaughtException extends PredefinedException {
    private static final long serialVersionUID = 1L;

    public UncaughtException(Throwable thrownByVmInUserSpace) {
        super(thrownByVmInUserSpace);
    }

    public UncaughtException(String messageThrownByUser, Throwable throwableWrapper) {
        // We have no good way to communicate this within the standard exception hierarchy so just pass the message.
        super(messageThrownByUser, throwableWrapper);
    }

    public int getCode() {
        return Status.UnknownFailure;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy