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

org.snapscript.core.link.ExceptionPackage Maven / Gradle / Ivy

package org.snapscript.core.link;

import org.snapscript.core.error.InternalStateException;
import org.snapscript.core.scope.Scope;

public class ExceptionPackage implements Package {
   
   private final Exception cause;
   private final String message;
   
   public ExceptionPackage(String message, Exception cause) {
      this.message = message;
      this.cause = cause;
   }  
   
   @Override
   public PackageDefinition create(Scope scope) throws Exception {
      throw new InternalStateException(message, cause);
   }             
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy