summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-02 12:58:07 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-02 12:58:07 +1100
commit4d9346e580664babba2dad5d12a30acbcebd2787 (patch)
treef8b9b077e7cd0703789f84bacb2dcb6f1774e80e
parentfeat: toggle borders option (diff)
downloadcaelestia-shell-4d9346e580664babba2dad5d12a30acbcebd2787.tar.gz
caelestia-shell-4d9346e580664babba2dad5d12a30acbcebd2787.tar.bz2
caelestia-shell-4d9346e580664babba2dad5d12a30acbcebd2787.zip
app: catch errors in main
-rw-r--r--app.tsx42
1 files changed, 23 insertions, 19 deletions
diff --git a/app.tsx b/app.tsx
index a035b69..351e617 100644
--- a/app.tsx
+++ b/app.tsx
@@ -65,30 +65,34 @@ App.start({
instanceName: "caelestia",
icons: "assets/icons",
async main() {
- const now = Date.now();
+ try {
+ const now = Date.now();
- await initConfig();
+ await initConfig();
- loadStyleAsync().catch(console.error);
- Palette.get_default().connect("notify::colours", () => loadStyleAsync().catch(console.error));
- Palette.get_default().connect("notify::mode", () => loadStyleAsync().catch(console.error));
+ loadStyleAsync().catch(console.error);
+ Palette.get_default().connect("notify::colours", () => loadStyleAsync().catch(console.error));
+ Palette.get_default().connect("notify::mode", () => loadStyleAsync().catch(console.error));
- <Launcher />;
- <NotifPopups />;
- <Osds />;
- <Session />;
- Monitors.get_default().forEach(m => <SideBar monitor={m} />);
- Monitors.get_default().forEach(m => <Bar monitor={m} />);
- Monitors.get_default().forEach(m => <ScreenCorners monitor={m} />);
+ <Launcher />;
+ <NotifPopups />;
+ <Osds />;
+ <Session />;
+ Monitors.get_default().forEach(m => <SideBar monitor={m} />);
+ Monitors.get_default().forEach(m => <Bar monitor={m} />);
+ Monitors.get_default().forEach(m => <ScreenCorners monitor={m} />);
- // Init services
- timeout(1000, () => {
- idle(() => Schemes.get_default());
- idle(() => Wallpapers.get_default());
- idle(() => Calendar.get_default());
- });
+ // Init services
+ timeout(1000, () => {
+ idle(() => Schemes.get_default());
+ idle(() => Wallpapers.get_default());
+ idle(() => Calendar.get_default());
+ });
- console.log(`Caelestia started in ${Date.now() - now}ms`);
+ console.log(`Caelestia started in ${Date.now() - now}ms`);
+ } catch (e) {
+ console.error(e);
+ }
},
requestHandler(request, res) {
if (request === "reload-css") loadStyleAsync().catch(console.error);