in our code we use macro to encapsulate all the usec-cases in our app. We log runtime and outcome of the usecase. In case of errors we log the message and stacktrace as well.
But in case of errors we are raising the error again after logging and thus we loose the original stacktrace. It would be nice in development to keep the original stacktrace. Not sure if that is possible
try do # call use_case rescue e -> log_error(e, System.stacktrace) raise e # but keep the original stack-trace end