mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-18 04:29:22 +00:00
Better exception reporting in objj
[#38 state:resolved responsible:tlrobinson]
This commit is contained in:
1 parent
0ffbca776f
commit
36ec2d3027
1 file changed
+35
-26
+35
-26
@@ -27,29 +27,38 @@ else
|
||||
OBJJ_INCLUDE_PATHS = [OBJJ_LIB+'/Frameworks'];
|
||||
}
|
||||
|
||||
if (arguments.length > 0)
|
||||
{
|
||||
var main_file = arguments[0];
|
||||
arguments.splice(0, 1);
|
||||
|
||||
if (debug)
|
||||
print("Loading: " + main_file);
|
||||
|
||||
objj_import(main_file, NO);
|
||||
|
||||
serviceTimeouts();
|
||||
|
||||
if (debug)
|
||||
print("Done!");
|
||||
}
|
||||
else if (typeof objj_console != "undefined")
|
||||
{
|
||||
if (debug)
|
||||
print("Starting Objective-J console.");
|
||||
|
||||
objj_console();
|
||||
}
|
||||
else
|
||||
{
|
||||
print("Error: No file provided or console available.")
|
||||
}
|
||||
try {
|
||||
if (arguments.length > 0)
|
||||
{
|
||||
var main_file = arguments[0];
|
||||
arguments.splice(0, 1);
|
||||
|
||||
if (debug)
|
||||
print("Loading: " + main_file);
|
||||
|
||||
objj_import(main_file, NO);
|
||||
|
||||
serviceTimeouts();
|
||||
|
||||
if (debug)
|
||||
print("Done!");
|
||||
}
|
||||
else if (typeof objj_console != "undefined")
|
||||
{
|
||||
if (debug)
|
||||
print("Starting Objective-J console.");
|
||||
|
||||
objj_console();
|
||||
}
|
||||
else
|
||||
{
|
||||
print("Error: No file provided or console available.")
|
||||
}
|
||||
} catch (e) {
|
||||
print("OBJJ EXCEPTION: " + e);
|
||||
print(" Name: " + e.name);
|
||||
print(" Message: " + e.message);
|
||||
print(" Java: " + e.javaException);
|
||||
print(" File: " + e.fileName);
|
||||
print(" Line: " + e.lineNumber);
|
||||
}
|
||||
Reference in new issue
Block a user