You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a pretty common scenario in my code base that I have had a hard time getting slingshot to handle properly. Not sure if there is already some code that solves this problem or if something could/should be added to make my scenario easier.
I have an exception that occurs at a lower level in the code and as that exception bubbles up, higher levels of the code have additional error context to add. I would like to assoc more information into the map at each of the higher level points without increasing the depth of the exception stack (and possibly not changing the error message). A pretty trivial example is below:
The above has:
ExceptionInfo
-->ExceptionInfo
----> ExceptionInfo
------> RuntimeException
Really all I wanted was the additional information (i.e. the :more-info, :one-last, etc from above). It's more difficult to find out the real error now and I have to be careful about the error message (make sure I drag it along with me from the lower level exception).
To make this easier, I created a new macro I called merge-throw+:
I have a pretty common scenario in my code base that I have had a hard time getting slingshot to handle properly. Not sure if there is already some code that solves this problem or if something could/should be added to make my scenario easier.
I have an exception that occurs at a lower level in the code and as that exception bubbles up, higher levels of the code have additional error context to add. I would like to assoc more information into the map at each of the higher level points without increasing the depth of the exception stack (and possibly not changing the error message). A pretty trivial example is below:
The above has:
ExceptionInfo
-->ExceptionInfo
----> ExceptionInfo
------> RuntimeException
Really all I wanted was the additional information (i.e. the :more-info, :one-last, etc from above). It's more difficult to find out the real error now and I have to be careful about the error message (make sure I drag it along with me from the lower level exception).
To make this easier, I created a new macro I called merge-throw+:
Am I going about this in the right way? Is there something built in that makes what I'm wanting easier?
The text was updated successfully, but these errors were encountered: