-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Translate exceptions messages
PostPosted: Mon Apr 30, 2007 3:02 pm 
Newbie

Joined: Wed Oct 06, 2004 4:39 pm
Posts: 17
Hibernate version: 3.2

I need translate the exception´s message to spanish, i.e, in StaleObjectStateException i need the message "Otro usuario ....". How can i do this?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 01, 2007 4:50 am 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
Catch it, and create a new exception with another message. I can't see another way.

But you should be aware that you should not throw the hibernate exception to the upper layers. Imo, maybe you should at least wrap it with a business exception that you might create.

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.