1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Better error reporting.

This commit is contained in:
Cedric Beust 2015-11-15 21:27:05 -08:00
parent 556e081508
commit b08790cf50

View file

@ -76,9 +76,14 @@ public class DynamicGraphExecutor<T>(val graph: DynamicGraph<T>,
} catch(ex: TimeoutException) { } catch(ex: TimeoutException) {
log(2, "Time out") log(2, "Time out")
} catch(ex: Exception) { } catch(ex: Exception) {
if (ex.cause is InvocationTargetException if (ex.cause is InvocationTargetException) {
&& (ex.cause as InvocationTargetException).targetException is KobaltException) { val ite = ex.cause
throw (ex.cause as InvocationTargetException).targetException if (ite.targetException is KobaltException) {
throw (ex.cause as InvocationTargetException).targetException
} else {
error("Error: ${ite.cause?.message}", ite.cause)
gotError = true
}
} else { } else {
error("Error: ${ex.message}", ex) error("Error: ${ex.message}", ex)
gotError = true gotError = true