I was trying to get more meaningful stack traces, but it seems that the exception we catch does not carry any more specific details about the step that failed. The only info we get is that the pipeline step failed and the exit code it failed with.
Example pipeline code snippet:
node {
try {
stage('do-stuff') {
sh "echo do somehing; exit 0"
}