Skip to content

Commit

Permalink
fixed indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Nimaoth committed Jan 9, 2024
1 parent a3c72c0 commit 3cf24e7
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/app.nim
Original file line number Diff line number Diff line change
Expand Up @@ -279,21 +279,21 @@ proc invokeCallback*(self: App, context: string, args: JsonNode): bool =

proc invokeAnyCallback*(self: App, context: string, args: JsonNode): JsonNode =
if self.callbacks.contains(context):
let id = self.callbacks[context]
try:
withScriptContext self, self.scriptContext:
let res = self.scriptContext.handleAnyCallback(id, args)
if res.isNotNil:
return res
let id = self.callbacks[context]
try:
withScriptContext self, self.scriptContext:
let res = self.scriptContext.handleAnyCallback(id, args)
if res.isNotNil:
return res

withScriptContext self, self.wasmScriptContext:
let res = self.wasmScriptContext.handleAnyCallback(id, args)
if res.isNotNil:
return res
withScriptContext self, self.wasmScriptContext:
let res = self.wasmScriptContext.handleAnyCallback(id, args)
if res.isNotNil:
return res
return nil
except CatchableError:
log(lvlError, fmt"Failed to run script handleAnyCallback {id}: {getCurrentExceptionMsg()}")
log(lvlError, getCurrentException().getStackTrace())
except CatchableError:
log(lvlError, fmt"Failed to run script handleAnyCallback {id}: {getCurrentExceptionMsg()}")
log(lvlError, getCurrentException().getStackTrace())
return nil

else:
Expand Down

0 comments on commit 3cf24e7

Please sign in to comment.