Package erjang

Examples of erjang.ErlangError


  }
 
  @BIF
 
  static public EObject error(EObject reason) {
    throw new ErlangError(reason);
  }
View Full Code Here


  @BIF
 
  static public EObject error(EObject reason, EObject args) {
    ESeq aseq = args.testSeq();
    if (aseq == null) throw ERT.badarg(reason, args);
    throw new ErlangError(reason, aseq.toArray());
  }
View Full Code Here

    return v1 / v2;
  }

  private static void test_zero(double v1, double v2) {
    if (v2 == 0.0)
      throw new ErlangError(ERT.AM_BADARITH, ERT.NIL.cons(v2).cons(v1));
  }
View Full Code Here

      log.log(Level.FINE, "cannot load module", e);
      return new ETuple2(ERT.am_error, e.reason());
    } catch (ThreadDeath e) {
      throw e;
    } catch (Throwable e) {
      ErlangError ee = new ErlangError(ERT.am_badfile, e, mod, bin);
      ETuple2 result = new ETuple2(ERT.am_error, ee.reason());
     
      log.log(Level.SEVERE, "cannot load module "+mod, e);
     
      return result;
    }
View Full Code Here

    }

    @BIF
    public static EObject nif_error(EObject err) {

        ErlangError exit = new ErlangError(err);

        log.log(Level.INFO, "missing nif "+err, exit);

        throw exit;
    }
View Full Code Here

    try {
      EObject val = in.read_any();
      //System.out.println("DECODED:"+val);
      return val;
    } catch (IOException e) {
      throw new ErlangError(ERT.am_badarg, e, arg);
    }
  }
View Full Code Here

    }
    try {
      EObject val = in.read_any();
      return val;
    } catch (ErlangError e) {
      throw new ErlangError(ERT.am_badarg, e, arg);
    } catch (IOException e) {
      throw new ErlangError(ERT.am_badarg, e, arg);
    }
  }
View Full Code Here

      }

      break;
    }

    throw new ErlangError(ERT.am_badsig, msg);
  }
View Full Code Here

        System.err.println(" cmd["+i+"]=" + cmd[i]);
      }
      */

      if (f == null) {
        throw new ErlangError(EAtom.intern("enoent"));
      }

      if (!f.canExecute()) {
        throw new ErlangError(EAtom.intern("eaccess"));
      }


      super.setupInstance();

View Full Code Here

    }

    try {
      this.process = Runtime.getRuntime().exec(cmd, envp, ERT.newFile(cwd));
    } catch (IOException e1) {
      throw new ErlangError(e1);
    }

    List<String> al = new ArrayList<String>();
    Collections.addAll(al, cmd);
View Full Code Here

TOP

Related Classes of erjang.ErlangError

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.