Added exception handling in the main loop for the web server to avoid the main loop thread getting killed off due to an unexpected/unhandled exception.
Moved code for JSON handling and metadata/metadata container into the Common project from the Foundation project.
This commit is contained in:
@@ -31,12 +31,17 @@ public ResourceRequestHandler() {
|
||||
try {
|
||||
InputStream in = getClass().getClassLoader().getResourceAsStream("framework.js");
|
||||
|
||||
try {
|
||||
frameworkJavascript = StreamSupport.readText(in, "UTF8");
|
||||
}//try//
|
||||
finally {
|
||||
try {in.close();} catch(Throwable e) {}
|
||||
}//finally//
|
||||
if(in != null) {
|
||||
try {
|
||||
frameworkJavascript = StreamSupport.readText(in, "UTF8");
|
||||
}//try//
|
||||
finally {
|
||||
try {in.close();} catch(Throwable e) {}
|
||||
}//finally//
|
||||
}//if//
|
||||
else {
|
||||
Debug.log("Warning: framework.js not found!");
|
||||
}//else//
|
||||
}//try//
|
||||
catch(Throwable e) {
|
||||
Debug.log("Failed to read the framework.js file from the framework jar.", e);
|
||||
|
||||
Reference in New Issue
Block a user