Package org.rascalmpl.interpreter.control_exceptions

Examples of org.rascalmpl.interpreter.control_exceptions.Throw


  public static Throw io(IString msg, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(IO, msg), ast, trace);
  }
 
  private static Throw javaException(String clazz, String message, IValue cause, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(Java, VF.string(clazz), VF.string(message), cause), ast, trace);
  }
View Full Code Here


  private static Throw javaException(String clazz, String message, IValue cause, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(Java, VF.string(clazz), VF.string(message), cause), ast, trace);
  }

  private static Throw javaException(String clazz, String message, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(Java, VF.string(clazz), VF.string(message)), ast, trace);
  }
View Full Code Here

      String msg = targetException.getMessage();
      StackTrace trace = buildTrace(targetException, rascalTrace);
      Throwable cause = targetException.getCause();

      if (cause != null && cause != targetException) {
        Throw throwCause = cause instanceof Throw ? (Throw) cause : javaException(cause, ast, rascalTrace);
        return javaException(clazz, msg != null ? msg : "", throwCause.getException(), ast, trace);
      }
      else {
        return javaException(clazz, msg != null ? msg : "", ast, trace);
      }
    } catch (IOException e1) {
View Full Code Here

    newTrace.addAll(rascalTrace);
    return newTrace.freeze();
  }
 
  public static Throw moduleNotFound(IString module, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(ModuleNotFound, module), ast, trace);
  }
View Full Code Here

  public static Throw moduleNotFound(IString module, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(ModuleNotFound, module), ast, trace);
  }
 
  public static Throw noSuchAnnotation(String label, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(NoSuchAnnotation, VF.string(label)), ast, trace);
  }
View Full Code Here

  }

 

  public static Throw noSuchKey(IValue v, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(NoSuchKey, v), ast, trace);
  }
View Full Code Here

  public static Throw noSuchKey(IValue v, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(NoSuchKey, v), ast, trace);
  }
 
  public static Throw parseError(ISourceLocation loc, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(ParseError, loc), ast, trace);
  }
View Full Code Here

  public static Throw parseError(ISourceLocation loc, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(ParseError, loc), ast, trace);
  }
 
  public static Throw pathNotFound(ISourceLocation loc, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(PathNotFound, loc), ast, trace);
  }
View Full Code Here

  public static Throw pathNotFound(ISourceLocation loc, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(PathNotFound, loc), ast, trace);
  }
 
  public static Throw stackOverflow(AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(StackOverflow), ast, trace);
  }
View Full Code Here

  }
 
  // The status of the following exceptions is to be determined (alphabetical order)
 
  public static Throw arityMismatch(int expected, int got, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(ArityMismatch, VF.integer(expected), VF.integer(got)), ast, trace);
  }
View Full Code Here

TOP

Related Classes of org.rascalmpl.interpreter.control_exceptions.Throw

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.