In Bitbucket 8.1, exceptions thrown by command handlers' process() method are consumed, whereas in Bitbucket 7 they are wrapped and propagated to com.atlassian.bitbucket.scm.Command.call() and therefore can be handled appropriately.
By adding breakpoints in the Bitbucket source it was determined that BioStdioHandler.RemoteWatchdog.reportError is called, storing the exception. However BioStdioHandler.onComplete() is never called, so the exception is not re-thrown.
- See above
Exceptions thrown in CommandOutputHandler.process() method are propagated (like in Bitbucket 7) and can be handled
The exceptions are not propagated since, as mentioned above, BioStdioHandler.onComplete() is never called
No workaround available at the moment.