Skip to content

Commit

Permalink
bootstrap error_logger for use until the real one comes up (meybe del…
Browse files Browse the repository at this point in the history
…ete again after bootstrap complete)
  • Loading branch information
krestenkrab committed Dec 10, 2009
1 parent 3ccb02b commit 04370ee
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/main/java/erjang/EErrorLogger.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* This file is part of Erjang - A JVM-based Erlang VM
*
* Copyright (c) 2009 by Trifork
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/


package erjang;

import java.io.File;
import java.net.MalformedURLException;

/**
*
*/
public class EErrorLogger {


public static void start()
{
try {
EModule.load_module(EAtom.intern("erjang"), new File("target/classes").toURI().toURL());
} catch (MalformedURLException e) {
throw new Error(e);
}

EProc proc = new EProc(null, EAtom.intern("erjang"), EAtom.intern("error_loop"), ERT.NIL);
ERT.register(EAtom.intern("error_logger"), proc.self());
ERT.run(proc);
}


}

0 comments on commit 04370ee

Please sign in to comment.