completed runtime handling of multiple files and their exceptions

This commit is contained in:
benfry
2004-07-06 23:33:26 +00:00
parent e999598870
commit 1a81a3f9f8
7 changed files with 194 additions and 44 deletions

View File

@@ -4,8 +4,8 @@
PdeException - an exception with a line number attached
Part of the Processing project - http://processing.org
Except where noted, code is written by Ben Fry and
Copyright (c) 2001-03 Massachusetts Institute of Technology
Except where noted, code is written by Ben Fry and is
Copyright (c) 2001-04 Massachusetts Institute of Technology
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@
public class PdeException extends Exception {
int file = -1;
int line = -1;
int column = -1;
@@ -31,7 +32,6 @@ public class PdeException extends Exception {
public PdeException(String message) {
super(massage(message));
//System.out.println("message for this error is " + message);
}
public PdeException(String message, int line) {
@@ -39,13 +39,19 @@ public class PdeException extends Exception {
this.line = line;
}
// 0060 currently only used by the new preprocessor
public PdeException(String message, int line, int column) {
super(massage(message));
this.line = line;
this.column = column;
}
public PdeException(String message, int file, int line, int column) {
super(massage(message));
this.file = file;
this.line = line;
this.column = column;
}
// make static so that super() can call it
static public final String massage(String msg) {
if (msg.indexOf("java.lang.") == 0) {