Ejemplo n.º 1
0
  @BIF
  public static EObject halt(EProc proc, EObject value) {
    int exitCode = 1;
    String message = null;
    if (value != null) {
      ESmall val = value.testSmall();
      if (val != null) {
        exitCode = val.value;
      }

      EString str = value.testString();
      if (str != null) {
        message = str.stringValue();
      }
    }

    /*
    // TODO: create crash file
    if (message != null) {
    	log.severe("halting system: " + message);
    }
    else {
    	log.info("halting system");
    }
    */
    ERT.shutdown();

    throw new ErlangHalt();
  }