|
|
@@ -712,6 +712,16 @@
|
|
|
content]])))
|
|
|
|
|
|
(rum/defcs catch-error
|
|
|
+ < {:did-catch
|
|
|
+ (fn [state error _info]
|
|
|
+ (log/error :exception error)
|
|
|
+ (assoc state ::error error))}
|
|
|
+ [{error ::error, c :rum/react-component} error-view view]
|
|
|
+ (if (some? error)
|
|
|
+ error-view
|
|
|
+ view))
|
|
|
+
|
|
|
+(rum/defcs catch-error-and-notify
|
|
|
< {:did-catch
|
|
|
(fn [state error _info]
|
|
|
(log/error :exception error)
|