Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
how to fail initialize
Jim
2/16/2007 3:16:00 PM
I would like to know the correct way to fail the creating of an object.
I would return a NULL in c/c++ but returning a nil does not to seem to
work correctly i.e.
if(obj) then do stuff
OR
if(obj != nil) then do stuff
New to Ruby if you couldn't guess.
Jim.
--
Posted via
http://www.ruby-...
.
2 Answers
Ara.T.Howard
2/16/2007 3:21:00 PM
0
Jim
2/16/2007 3:37:00 PM
0
Thanks for quick response, I decided to do error testing before creating
object thus removing the problem, I find exception handling messy.
Thanks,
Jim.
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
how to fail initialize
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password