-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from kepler16/20-excessive-error-wrapping
fix(#20): do not throw wrapped error
- Loading branch information
Showing
5 changed files
with
78 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
(ns failures | ||
(:require [k16.gx.beta.system :as gx.system])) | ||
|
||
(defn start-1 [_] | ||
(let [a 10 | ||
e 0] | ||
(/ a e))) | ||
|
||
(defn stop-1 [_] :stopped) | ||
|
||
(def parent-component {:gx/start {:gx/processor start-1} | ||
:gx/stop {:gx/processor stop-1}}) | ||
|
||
(def graph {:config {:foo {:bar "something"}} | ||
:parent {:gx/component 'failures/parent-component | ||
:gx/props '(gx/ref :config)} | ||
:child {:foo 1 | ||
:paren-data '(gx/ref :parent)}}) | ||
|
||
(def system_name ::sys) | ||
|
||
(comment | ||
(gx.system/register! system_name {:graph graph}) | ||
@(gx.system/signal! system_name :gx/start) | ||
(print (gx.system/failures-humanized system_name)) | ||
(gx.system/failed-nodes system_name) | ||
(:exception (first (:causes (last (gx.system/failures system_name))))) | ||
(:internal-data (first (:failures (ex-data (.getCause *e))))) | ||
(first (gx.system/failures system_name))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,4 +70,3 @@ | |
:signal-key :gx/stop | ||
:causes []}]} | ||
(ex-data err)))))) | ||
|
0393cb1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
gx – ./
gx-kepler16.vercel.app
gx.kepler16.com
gx-git-master-kepler16.vercel.app