--WTbgq2twYBxfsYA6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

> hi to all,
> 	First of all, I'm a newbie in OOP programming and ruby so please excuse =
me
> for my poor language.

	That's okay, newbies welcome.

> Anyway, I'm trying to catch an error without exiting the program,
> i.e.  an equivalent to rescue, but without the exit.
>=20
> is it possibile?

	Absolutely.

begin
  # some code that raises an error
  a =3D 1/0
rescue ZeroDivisionError
  puts "Can't divide by 0... back to math 101 for you..."
end

	And your program should tick along nicely.  Checkout the=20
Programming Ruby book: has some nice examples/documentation.  -sc
 =20

> thank you in advance,
> Marco
>=20
> PS: please CC to me the answer because I'm not subscribed to the list, be=
cause
> there's high traffic!

--=20
Sean Chittenden

--WTbgq2twYBxfsYA6
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Comment: Sean Chittenden <sean / chittenden.org>

iEYEARECAAYFAjuKD8UACgkQn09c7x7d+q0OIwCeMbzkdvJKX8QA/RckDxuXoEod
WSoAoMjzNEkHA/UBpHeMEUrIWVQvA80U
=7y0g
-----END PGP SIGNATURE-----

--WTbgq2twYBxfsYA6--
> hi to all,
> 	First of all, I'm a newbie in OOP programming and ruby so please excuse =
me
> for my poor language.

	That's okay, newbies welcome.

> Anyway, I'm trying to catch an error without exiting the program,
> i.e.  an equivalent to rescue, but without the exit.
>=20
> is it possibile?

	Absolutely.

begin
  # some code that raises an error
  a =3D 1/0
rescue ZeroDivisionError
  puts "Can't divide by 0... back to math 101 for you..."
end

	And your program should tick along nicely.  Checkout the=20
Programming Ruby book: has some nice examples/documentation.  -sc
 =20

> thank you in advance,
> Marco
>=20
> PS: please CC to me the answer because I'm not subscribed to the list, be=
cause
> there's high traffic!

--=20
Sean Chittenden
-----BEGIN PGP SIGNATURE-----
Comment: Sean Chittenden <sean / chittenden.org>

iEYEARECAAYFAjuKD8UACgkQn09c7x7d+q0OIwCeMbzkdvJKX8QA/RckDxuXoEod
WSoAoMjzNEkHA/UBpHeMEUrIWVQvA80U
=7y0g
-----END PGP SIGNATURE-----