Skip to content

Commit 5e89ab1

Browse files
committed
chore: show error messages
1 parent 5e58fee commit 5e89ab1

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

packages/angular/src/lib/application.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,12 @@ export function runNativeScriptAngularApp<T, K>(options: AppRunOptions<T, K>) {
184184
emitModuleBootstrapEvent(ref, 'main', reason);
185185
// bootstrapped component: (ref as any)._bootstrapComponents[0];
186186
},
187-
(err) => showErrorUI(err)
187+
(err) => {
188+
bootstrapped = true;
189+
NativeScriptDebug.bootstrapLogError(`Error bootstrapping app module:\n${err.message}\n\n${err.stack}`);
190+
showErrorUI(err);
191+
throw err;
192+
}
188193
);
189194
Utils.queueMacrotask(() => {
190195
if (currentBootstrapId !== bootstrapId) {
@@ -226,7 +231,11 @@ export function runNativeScriptAngularApp<T, K>(options: AppRunOptions<T, K>) {
226231
};
227232
emitModuleBootstrapEvent(loadingModuleRef, 'loading', reason);
228233
},
229-
(err) => showErrorUI(err)
234+
(err) => {
235+
NativeScriptDebug.bootstrapLogError(`Error bootstrapping loading module:\n${err.message}\n\n${err.stack}`);
236+
showErrorUI(err);
237+
throw err;
238+
}
230239
);
231240
} else if (options.launchView) {
232241
let launchView = options.launchView(reason);

0 commit comments

Comments
 (0)