☰
d2jsp
Rules
Help
Forum Gold FAQ
Live Streams
Photo Gallery
Hourly Raffle
Ladder Slasher
Log In
Register
Log In
Register
Account Recovery
Resend Validation Email
d2jsp Forums
>
Off-Topic
>
Computers & IT
>
Programming & Development
> Java: Interacting With A Database
Prev
1
2
3
Add Reply
New Topic
New Poll
Views: 902
Replies: 25
Track Topic
MidnightRider
Member
Posts: 11,881
Joined: Aug 17 2007
Gold
:
0.00
#21
Dec 3 2014 11:32am
Quote (carteblanche @ Dec 3 2014 02:22am)
your business layer will throw an exception, and your presentation layer will catch it and tell the user that the id is invalid and needs to be entered again.
Thank you sir!
Appreciate it.
MidnightRider
Member
Posts: 11,881
Joined: Aug 17 2007
Gold
:
0.00
#22
Dec 4 2014 12:19pm
Mhhh..Just kidding.
Solved problem by using merge as oppossed to saveOrUpdate.
Guess I should actually read the documentation
This post was edited by MidnightRider on Dec 4 2014 12:39pm
MidnightRider
Member
Posts: 11,881
Joined: Aug 17 2007
Gold
:
0.00
#23
Dec 6 2014 03:32pm
If I am throwing an exception up to the Main method (no catch block), why does Eclipse insist I have a finally block?
I don't have any resources to close, but it feels wrong to put an empty finally block.
What am I missing?
carteblanche
Member
Posts: 32,925
Joined: Jul 23 2006
Gold
:
3,804.50
#24
Dec 6 2014 08:55pm
if you have a try {}, you need either finally {} or catch {}
MidnightRider
Member
Posts: 11,881
Joined: Aug 17 2007
Gold
:
0.00
#25
Dec 7 2014 10:53am
Quote (carteblanche @ Dec 6 2014 10:55pm)
if you have a try {}, you need either finally {} or catch {}
What if I don't have any "finally" code I want to execute?
Does that mean I've set things up incorrectly
carteblanche
Member
Posts: 32,925
Joined: Jul 23 2006
Gold
:
3,804.50
#26
Dec 7 2014 10:30pm
Quote (MidnightRider @ Dec 7 2014 11:53am)
What if I don't have any "finally" code I want to execute?
Does that mean I've set things up incorrectly
then why are you using try{}? get rid of the try{} or add a catch{}/finally{}
Go Back To
Programming & Development
Topic List
Prev
1
2
3
Add Reply
New Topic
New Poll
© 2003-2026 d2jsp
Contact