Forums

Do we have an Exit?

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Do we have an Exit?

Postby Caligari » Wed Apr 15, 2009 11:35 pm

Is there an Exit command or method for Cobra that I've missed? I'm looking for something that stops program execution from anywhere, probably providing an optional status code.

I found System.Environment.Exit (I'm doing this from memory, but I think that is it), which does what I'm talking about, but I'm a little surprised there isn't anything in Cobra itself to at least shortcut to that.

- Caligari

PS. I've revised the regex sample, but I've done so twice and now I want to merge the two sets of changes before I submit it again. Soon, I promise.
Caligari
 
Posts: 33

Re: Do we have an Exit?

Postby Charles » Thu Apr 16, 2009 12:05 am

I've just added CobraCore.exit(code) if you happen to be using Cobra out of a workspace. It's not much shorter than Environment.exit(code) (CLR) or System.exit(code) (JVM). I added it primarily so that it will be cross platform.
Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 34 guests