Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excessive error wrapping #20

Closed
plexus opened this issue Dec 11, 2022 · 3 comments · Fixed by #21
Closed

Excessive error wrapping #20

plexus opened this issue Dec 11, 2022 · 3 comments · Fixed by #21
Labels

Comments

@plexus
Copy link

plexus commented Dec 11, 2022

When something goes wrong during startup (or any signal handling, presumably), the real cause of the failure is hidden in multiple layers. This is the code needed to get to the actual exception:

(:ex (:internal-data (first (:failures (ex-data (.getCause *e))))))

You need to unwrap

  • java.util.concurrent.ExcecutionException
  • clojure.lang.ExceptionInfo
  • a :failures sequence
  • A wrapping map with an :internal-data key
  • A wrapping map with an :ex key

This makes for a rather poor user experience.

armed added a commit that referenced this issue Dec 17, 2022
@armed armed linked a pull request Dec 17, 2022 that will close this issue
@armed
Copy link
Contributor

armed commented Dec 17, 2022

@plexus in #21 gx.system now throws unwrapped root exception (last available failure). Additionally, it now logs a humanized error to sderr. In *e now we have the real cause.
Please, check whether that fix works for you.

@armed armed closed this as completed in #21 Jan 4, 2023
armed added a commit that referenced this issue Jan 4, 2023
@github-actions
Copy link

github-actions bot commented Jan 4, 2023

🎉 This issue has been resolved in version 2.8.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@plexus
Copy link
Author

plexus commented Jan 9, 2023

Thank you!

plexus added a commit to lambdaisland/gx.cljc that referenced this issue Oct 3, 2023
### Features

* add system/states-map utility function ([5dca77a](kepler16@5dca77a))

## [2.8.10](kepler16/gx.cljc@v2.8.9...v2.8.10) (2023-02-16)

### Bug Fixes

* show root failure + subsequent failures in ex-data ([1c4af0f](kepler16@1c4af0f))

## [2.8.9](kepler16/gx.cljc@v2.8.8...v2.8.9) (2023-01-26)

### Bug Fixes

* **TRE-1096:** in some cases wrong cause is thrown ([53d0263](kepler16@53d0263))

## [2.8.8](kepler16/gx.cljc@v2.8.7...v2.8.8) (2023-01-20)

### Bug Fixes

* mvn/repos ([bcd9fc8](kepler16@bcd9fc8))
* user k16/metabuild ([c2d1273](kepler16@c2d1273))
* workflow ([255c4d2](kepler16@255c4d2))

## [2.8.7](kepler16/gx.cljc@v2.8.6...v2.8.7) (2023-01-20)

### Bug Fixes

* bump promesa and malli ([42bce77](kepler16@42bce77))
* **resolve-symbol:** pass through non symbols ([9d051a2](kepler16@9d051a2))

## [2.8.5](kepler16/gx.cljc@v2.8.4...v2.8.5) (2023-01-06)

### Bug Fixes

* **kepler16#20:** do not throw wrapped error ([ab6c06a](kepler16@ab6c06a)), closes [kepler16#20](kepler16#20)
* display initial form in evaluate error ([36f2745](kepler16@36f2745))
* form evaluate errors ([623f563](kepler16@623f563))
* use console.error ([35803ed](kepler16@35803ed))

## [2.8.3](kepler16/gx.cljc@v2.8.2...v2.8.3) (2022-10-27)

### Bug Fixes

* remove extra print ([61a39fd](kepler16@61a39fd))

## [2.8.2](kepler16/gx.cljc@v2.8.1...v2.8.2) (2022-10-27)

### Bug Fixes

* humanize wasn't showing cause properly ([63775e4](kepler16@63775e4))

## [2.8.1](kepler16/gx.cljc@v2.8.0...v2.8.1) (2022-10-27)

### Bug Fixes

* incorrect props-schema error propagation ([5d79cb4](kepler16@5d79cb4))

### Features

* **TRE-856:** add error causes ([40d90c2](kepler16@40d90c2))

## [2.7.6](kepler16/gx.cljc@v2.7.5...v2.7.6) (2022-10-24)

### Bug Fixes

* changelog ([2e1f8f1](kepler16@2e1f8f1))

## [2.7.5](kepler16/gx.cljc@v2.7.4...v2.7.5) (2022-10-24)

### Bug Fixes

* **TRE-869:** better props emptiness check ([kepler16#19](kepler16#19)) ([3e5dd5d](kepler16@3e5dd5d))

## [2.7.4](kepler16/gx.cljc@v2.7.3...v2.7.4) (2022-10-22)

### Bug Fixes

* bump versions ([5850b2d](kepler16@5850b2d))
* promesa version ([82754c7](kepler16@82754c7))

## [2.7.3](kepler16/gx.cljc@v2.7.2...v2.7.3) (2022-07-14)

### Bug Fixes

* clj/cljs error wrap consistency ([e037b33](kepler16@e037b33))

## [2.7.2](kepler16/gx.cljc@v2.7.1...v2.7.2) (2022-07-04)

### Bug Fixes

* in some cases, old failure is not cleaned up ([a85f453](kepler16@a85f453))
* signal! resolve to nil on wrong system-name ([3b363e1](kepler16@3b363e1))

## [2.7.1](kepler16/gx.cljc@v2.7.0...v2.7.1) (2022-07-01)

### Bug Fixes

* failure is not cleaned from the previous signal ([15063f1](kepler16@15063f1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants