Revision: 4900
http://sourceforge.net/p/vexi/code/4900
Author: mkpg2
Date: 2016-11-17 13:26:41 +0000 (Thu, 17 Nov 2016)
Log Message:
-----------
Fix/Improve. Don't exit scheduler on error (not constructive).
Modified Paths:
--------------
branches/vexi3/org.vexi-core.main/src/test/java/test/core/hotreplace/TestHotReplace.java
branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Scheduler.java
Modified:
branches/vexi3/org.vexi-core.main/src/test/java/test/core/hotreplace/TestHotReplace.java
===================================================================
---
branches/vexi3/org.vexi-core.main/src/test/java/test/core/hotreplace/TestHotReplace.java
2016-11-09 12:47:16 UTC (rev 4899)
+++
branches/vexi3/org.vexi-core.main/src/test/java/test/core/hotreplace/TestHotReplace.java
2016-11-17 13:26:41 UTC (rev 4900)
@@ -36,10 +36,10 @@
// REMARK - implementation difference between apply and static access
so need to test both
- public void testApply() throws Exception{ test("main_apply.t"); }
- public void testStatic() throws Exception{ test("main_static.t"); }
+ public void testApply() throws Throwable{ test("main_apply.t"); }
+ public void testStatic() throws Throwable{ test("main_static.t"); }
- private void test(String main) throws Exception, JSExn{
+ private void test(String main) throws Throwable{
final File resources = new
File(TestHotReplace.class.getResource(".").getPath());
File root = Util.createTmpDir(TestHotReplace.class);
@@ -98,7 +98,7 @@
}
});
- Exception e = SCHEDULER.run();
+ Throwable e = SCHEDULER.run();
if(e!=null) throw e;
}finally{
Main.hotreplace = false;
Modified:
branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Scheduler.java
===================================================================
--- branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Scheduler.java
2016-11-09 12:47:16 UTC (rev 4899)
+++ branches/vexi3/org.vexi-library.js/src/main/java/org/ibex/js/Scheduler.java
2016-11-17 13:26:41 UTC (rev 4900)
@@ -90,7 +90,7 @@
* in the queue. A scheduler may choose to invoke
* Surface.renderAll() more often than that if it so chooses.
*/
- public Exception run() {
+ public Throwable run() {
threadlocal.set(this);
javathread = java.lang.Thread.currentThread();
return defaultRun();
@@ -100,7 +100,7 @@
// Default Implementation
//////////////////////////////////////////////////////
protected Object run(Callable c) throws Exception{ return c.run(null); }
- public Exception defaultRun() {
+ public Throwable defaultRun() {
try {
while (true) {
try {
@@ -117,17 +117,12 @@
renderAll();
/*} catch (Stop e){
Log.uInfo(Scheduler.class, "Scheduler halted: " +
e.getMessage());
- return;*/
- } catch (Error err) {
- logger.error(Scheduler.class, "Something has gone badly
wrong!");
- logger.error(Scheduler.class, err);
- return new Exception("Encountered '"+err.getMessage());
-
- } catch(Exception e) {
+ return;*/
+ } catch(Throwable e) {
// REMARK for running tests, as we need to pass any
// uncaught js/assertion exceptions out.
if (quitOnExn) {
- return e;
+ return e;
}
if (current instanceof Thread) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn