exception_except
Tristan B. Kildaire 4 years ago
parent 9763a85478
commit b84ee81e7b

@ -45,9 +45,9 @@ public final class Parser
*/ */
public static void expect(string message) public static void expect(string message)
{ {
throw new TError(message); //throw new TError(message);
//gprintln(message, DebugType.ERROR); gprintln(message, DebugType.ERROR);
//exit(0); /* TODO: Exit code */ /* TODO: Version that returns or asserts for unit tests */ exit(0); /* TODO: Exit code */ /* TODO: Version that returns or asserts for unit tests */
} }
/** /**

@ -1,15 +1,17 @@
module misc.exceptions; module misc.exceptions;
import gogga : generateMessage; //import gogga : generateMessage;
public class TError : Exception public class TError : Exception
{ {
this(string message) this(string message)
{ {
/* Generate eerror message using gogga */ /* Generate eerror message using gogga */
byte[] messageBytes = generateMessage(message, DebugType.ERROR); //byte[] messageBytes = generateMessage(message, DebugType.ERROR);
/* TODO: Check the vnode for path of fd 0, dont vt100 is not tty device */ /* TODO: Check the vnode for path of fd 0, dont vt100 is not tty device */
super(messageBytes); //super(messageBytes);
super("");
} }
} }
Loading…
Cancel
Save