| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 03/26/2006 14:20:44
|
dewwalker
Newbie
Joined: 03/26/2006 14:11:50
Messages: 1
Offline
|
Hello!
First off, this is an awesome tool and a much needed utility.
I was wondering how hard it would be to add either a flag or a command so that if any Exception occurs when reading a script to stop executing the remainder of the script.
Thanks!
Dan
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 03/26/2006 15:25:24
|
stdunbar
Newbie
![[Avatar]](/images/avatar/a87ff679a2f3e71d9181a67b7542122c.png)
Joined: 06/22/2005 14:51:37
Messages: 750
Location: Superior, CO, USA
Online
|
Great idea! - that would be very easy to add. Let me see what I can do.
|
Thanks for using the forums at hotjoe.com |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 08/16/2010 14:42:23
|
idiotjones
Newbie
Joined: 08/16/2010 14:30:47
Messages: 2
Offline
|
I agree that the tool is very useful, so thanks for writing it. And I'm particularly grateful that you output errors to stderr instead of stdout. The original post here was made a long time ago, so I was wondering: did the idea get shot down? I made a quick change to add this feature as a command-line option (thanks for the source!) and a check for the flag when catching an SQLException that then exits the program, but I'm not confident that my solution is the best solution. Therefore, I would just like to know if this is something that might make it into an official release in the near future. Or am I completely missing something, and it is already available?
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 08/17/2010 08:11:48
|
stdunbar
Newbie
![[Avatar]](/images/avatar/a87ff679a2f3e71d9181a67b7542122c.png)
Joined: 06/22/2005 14:51:37
Messages: 750
Location: Superior, CO, USA
Online
|
No, it got missed when I did the 2.x update
What do you think would make sense for an exit value? I generally try to follow the Unix pattern of exiting with a zero when everything worked ok, and non-zero other wise. Some programs try to use the exit value as almost an interprocess communication mechanism but that gets a bit complicated. Right now there is an exit with a one if some simple errors occur - should the SQLException be different?
Thanks for your feedback - I can role this in pretty quick but would like to make sure that it is useful to you too.
|
Thanks for using the forums at hotjoe.com |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 08/17/2010 10:18:32
|
idiotjones
Newbie
Joined: 08/16/2010 14:30:47
Messages: 2
Offline
|
All I am catching is that an error occurred, so an exit code of 1 works great for me. I suppose you could add an optional parameter for people who want to specify a different exit code, but that might be getting needlessly complicated.
In short, I like 1.
|
|
|
 |
|
|