don't throw away the cause of an exception

This commit is contained in:
Gavin King 2023-06-26 19:19:08 +02:00
parent 99da69fdc1
commit ade28621c2
1 changed files with 1 additions and 1 deletions

View File

@ -766,7 +766,7 @@ public class SessionImpl
.fireEventOnEachListener( event, PersistEventListener::onPersist ); .fireEventOnEachListener( event, PersistEventListener::onPersist );
} }
catch (MappingException e) { catch (MappingException e) {
originalException = getExceptionConverter().convert( new IllegalArgumentException( e.getMessage() ) ); originalException = getExceptionConverter().convert( new IllegalArgumentException( e.getMessage(), e ) );
} }
catch (RuntimeException e) { catch (RuntimeException e) {
originalException = getExceptionConverter().convert( e ); originalException = getExceptionConverter().convert( e );