Examples of Throw


Examples of org.rascalmpl.interpreter.control_exceptions.Throw

    }
    catch (InvocationTargetException e) {
      Throwable targetException = e.getTargetException();
     
      if (targetException instanceof Throw) {
        Throw th = (Throw) targetException;
       
        StackTrace trace = new StackTrace();
        trace.addAll(th.getTrace());
       
        ISourceLocation loc = th.getLocation();
        if (loc == null) {
          loc = getAst().getLocation();
        }
        trace.add(loc, null);

        th.setLocation(loc);
        trace.addAll(eval.getStackTrace());
        th.setTrace(trace.freeze());
        throw th;
      }
      else if (targetException instanceof StaticError) {
        throw (StaticError) targetException;
      }
View Full Code Here

Examples of org.rascalmpl.interpreter.control_exceptions.Throw

  public static Throw invalidUseOfLocation(String msg, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(InvalidUseOfLocation, VF.string(msg)), ast, trace);
 
 
  public static Throw invalidUseOfDateException(String message, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(InvalidUseOfDate, VF.string(message)), ast, trace);
  }
View Full Code Here

Examples of org.rascalmpl.interpreter.control_exceptions.Throw

  public static Throw invalidUseOfDateException(String message, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(InvalidUseOfDate, VF.string(message)), ast, trace);
  }
 
  public static Throw invalidUseOfTimeException(String message, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(InvalidUseOfTime, VF.string(message)), ast, trace);
  }
View Full Code Here

Examples of org.rascalmpl.interpreter.control_exceptions.Throw

  public static Throw invalidUseOfTimeException(String message, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(InvalidUseOfTime, VF.string(message)), ast, trace);
  }
 
  public static Throw invalidUseOfDateTimeException(String message, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(InvalidUseOfDateTime, VF.string(message)), ast, trace);
  }
View Full Code Here

Examples of org.rascalmpl.interpreter.control_exceptions.Throw

//  public static Throw locationNotFound(ISourceLocation loc, AbstractAST ast, StackTrace trace) {
//    return new Throw(LocationNotFound.make(VF, loc), ast, trace);
//  }
 
  public static Throw malformedURI(String uri, Default x, StackTrace trace) {
    return new Throw(VF.constructor(MalFormedURI, VF.string(uri)), x, trace);
  }
View Full Code Here

Examples of org.rascalmpl.interpreter.control_exceptions.Throw

  public static Throw malformedURI(String uri, Default x, StackTrace trace) {
    return new Throw(VF.constructor(MalFormedURI, VF.string(uri)), x, trace);
  }
 
  public static Throw MultipleKey(IValue v, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(MultipleKey, v), ast, trace);
  }
View Full Code Here

Examples of org.rascalmpl.interpreter.control_exceptions.Throw

  public static Throw MultipleKey(IValue v, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(MultipleKey, v), ast, trace);
  }
 
  public static Throw nameMismatch(String expected, String got, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(NameMismatch, VF.string(expected), VF.string(got)), ast, trace);
  }
View Full Code Here

Examples of org.rascalmpl.interpreter.control_exceptions.Throw

  public static Throw nameMismatch(String expected, String got, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(NameMismatch, VF.string(expected), VF.string(got)), ast, trace);
  }
 
  public static Throw noParent(ISourceLocation loc, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(NoParent, loc), ast, trace);
  }
View Full Code Here

Examples of org.rascalmpl.interpreter.control_exceptions.Throw

  public static Throw noParent(ISourceLocation loc, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(NoParent, loc), ast, trace);
  }
 
  public static Throw noSuchElement(IValue v, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(NoSuchElement,v), ast, trace)
  }
View Full Code Here

Examples of org.rascalmpl.interpreter.control_exceptions.Throw

  public static Throw noSuchElement(IValue v, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(NoSuchElement,v), ast, trace)
  }

  public static Throw noSuchField(String name, AbstractAST ast, StackTrace trace) {
    return new Throw(VF.constructor(NoSuchField, VF.string(name)), ast, trace);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.