cordo 2.4.1 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/errors/handle.ts
CHANGED
|
@@ -43,13 +43,13 @@ export namespace HandleErrors {
|
|
|
43
43
|
console.trace('No error handler found for', error.name)
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
function handleErrorStack(initialError: CordoError, handlers: CordoErrorHandler[], request: RouteRequest) {
|
|
46
|
+
async function handleErrorStack(initialError: CordoError, handlers: CordoErrorHandler[], request: RouteRequest) {
|
|
47
47
|
const handler = handlers.shift()
|
|
48
48
|
if (!handler)
|
|
49
49
|
return useDefaultHandler(initialError)
|
|
50
50
|
|
|
51
51
|
try {
|
|
52
|
-
handler(initialError, request)
|
|
52
|
+
await handler(initialError, request)
|
|
53
53
|
} catch (error) {
|
|
54
54
|
if (error instanceof CordoError)
|
|
55
55
|
handleErrorStack(error, handlers, request)
|
|
@@ -77,6 +77,8 @@ export async function evalRun(path: string, flags: number, i: CordoInteraction):
|
|
|
77
77
|
const routeResponse = RoutingRespond.callRoute(route.routeId, route.args, i, { disableRendering: true })
|
|
78
78
|
if (doWait)
|
|
79
79
|
await routeResponse
|
|
80
|
+
else
|
|
81
|
+
routeResponse.catch(() => {})
|
|
80
82
|
return true
|
|
81
83
|
} catch (e) {
|
|
82
84
|
if (e instanceof CordoError) {
|