More try-catch for getUpdate
This commit is contained in:
parent
503d5db16c
commit
a7d83782b6
1 changed files with 12 additions and 2 deletions
|
@ -196,6 +196,11 @@ class CastingHarness private constructor(
|
|||
)
|
||||
}
|
||||
} catch (mishap: Mishap) {
|
||||
val operator = try {
|
||||
getOperatorForPattern(iota, world)
|
||||
} catch (e: Throwable) {
|
||||
null
|
||||
}
|
||||
return CastResult(
|
||||
continuation,
|
||||
null,
|
||||
|
@ -205,7 +210,7 @@ class CastingHarness private constructor(
|
|||
mishap,
|
||||
Mishap.Context(
|
||||
(iota as? PatternIota)?.pattern ?: HexPattern(HexDir.WEST),
|
||||
getOperatorForPattern(iota, world)
|
||||
operator
|
||||
)
|
||||
)
|
||||
),
|
||||
|
@ -214,6 +219,11 @@ class CastingHarness private constructor(
|
|||
} catch (exception: Exception) {
|
||||
// This means something very bad has happened
|
||||
exception.printStackTrace()
|
||||
val operator = try {
|
||||
getOperatorForPattern(iota, world)
|
||||
} catch (e: Throwable) {
|
||||
null
|
||||
}
|
||||
return CastResult(
|
||||
continuation,
|
||||
null,
|
||||
|
@ -223,7 +233,7 @@ class CastingHarness private constructor(
|
|||
MishapError(exception),
|
||||
Mishap.Context(
|
||||
(iota as? PatternIota)?.pattern ?: HexPattern(HexDir.WEST),
|
||||
getOperatorForPattern(iota, world)
|
||||
operator
|
||||
)
|
||||
)
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue