Skip to content

Commit

Permalink
HHH-12830 Improve error message when a method is called in a non active
Browse files Browse the repository at this point in the history
transaction
  • Loading branch information
nikowitt authored and gsmet committed Jul 19, 2018
1 parent 255a096 commit 722ba32
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ else if ( "reconnect".equals( methodName ) || "disconnect".equals( methodName )
LOG.tracef( "Allowing invocation [%s] to proceed to real (non-transacted) session - deprecated methods", methodName );
}
else {
throw new HibernateException( methodName + " is not valid without active transaction" );
throw new HibernateException( "Calling method '" + methodName + "' is not valid without an active transaction (Current status: "
+ realSession.getTransaction().getStatus() + ")" );
}
}
LOG.tracef( "Allowing proxy invocation [%s] to proceed to real session", methodName );
Expand Down

0 comments on commit 722ba32

Please sign in to comment.