| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -88,7 +88,12 @@ export function getCssFileName(): string { | |||
| 88 | 88 | } | |
| 89 | 89 | ||
| 90 | 90 | export function loadAppCss(): void { | |
| 91 | - events.notify(<LoadAppCSSEventData>{ eventName: "loadAppCss", object: app, cssFile: getCssFileName() }); | ||
| 91 | + try { | ||
| 92 | + events.notify(<LoadAppCSSEventData>{ eventName: "loadAppCss", object: app, cssFile: getCssFileName() }); | ||
| 93 | + } catch (e) { | ||
| 94 | + throw new Error(`The file ${getCssFileName()} couldn't be loaded! ` + | ||
| 95 | + `You may need to register it inside ./app/vendor.ts.`); | ||
| 96 | + } | ||
| 92 | 97 | } | |
| 93 | 98 | ||
| 94 | 99 | export function addCss(cssText: string): void { | |
@@ -97,4 +102,4 @@ export function addCss(cssText: string): void { | |||
| 97 | 102 | ||
| 98 | 103 | global.__onUncaughtError = function (error: NativeScriptError) { | |
| 99 | 104 | events.notify(<UnhandledErrorEventData>{ eventName: uncaughtErrorEvent, object: app, android: error, ios: error, error: error }); | |
| 100 | - } | ||
| 105 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments