[WFLY-2949] Allow pass-by-reference for exceptions

https://issues.jboss.org/browse/WFLY-2949