| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -73,7 +73,12 @@ export function getCssFileName(): string { | |||
| 73 | 73 | } | |
| 74 | 74 | ||
| 75 | 75 | export function loadAppCss(): void { | |
| 76 | - events.notify(<LoadAppCSSEventData>{ eventName: "loadAppCss", object: app, cssFile: getCssFileName() }); | ||
| 76 | + try { | ||
| 77 | + events.notify(<LoadAppCSSEventData>{ eventName: "loadAppCss", object: app, cssFile: getCssFileName() }); | ||
| 78 | + } catch (e) { | ||
| 79 | + throw new Error(`The file ${getCssFileName()} couldn't be loaded! ` + | ||
| 80 | + `You may need to register it inside ./app/vendor.ts.`); | ||
| 81 | + } | ||
| 77 | 82 | } | |
| 78 | 83 | ||
| 79 | 84 | export function addCss(cssText: string): void { | |
@@ -82,4 +87,4 @@ export function addCss(cssText: string): void { | |||
| 82 | 87 | ||
| 83 | 88 | global.__onUncaughtError = function (error: NativeScriptError) { | |
| 84 | 89 | events.notify(<UnhandledErrorEventData>{ eventName: uncaughtErrorEvent, object: app, android: error, ios: error, error: error }); | |
| 85 | - } | ||
| 90 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments