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:
parent
556e081508
commit
b08790cf50
1 changed files with 8 additions and 3 deletions
|
@ -76,9 +76,14 @@ public class DynamicGraphExecutor<T>(val graph: DynamicGraph<T>,
|
|||
} catch(ex: TimeoutException) {
|
||||
log(2, "Time out")
|
||||
} catch(ex: Exception) {
|
||||
if (ex.cause is InvocationTargetException
|
||||
&& (ex.cause as InvocationTargetException).targetException is KobaltException) {
|
||||
throw (ex.cause as InvocationTargetException).targetException
|
||||
if (ex.cause is InvocationTargetException) {
|
||||
val ite = ex.cause
|
||||
if (ite.targetException is KobaltException) {
|
||||
throw (ex.cause as InvocationTargetException).targetException
|
||||
} else {
|
||||
error("Error: ${ite.cause?.message}", ite.cause)
|
||||
gotError = true
|
||||
}
|
||||
} else {
|
||||
error("Error: ${ex.message}", ex)
|
||||
gotError = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue