From: Eric Hodel Date: 2004-10-10T03:21:27+09:00 Subject: Re: Two rescues? --cf0hFtnykp6aONGL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable STEPHEN BECKER I V (Becker004@gmail.com) wrote: > begin > recurse(File::join(path, dir), max_depth - 1) if max_depth > 0=20 > rescue Errno::EACCES =3D> e # do not have access to folder skip it=20 > rescue Errno::DontRemember =3D> > end =20 >=20 > Can i do this? if not is there a way to jimmy-rig around this? I have > a program that i want to run on windows and linux but i get differnt > file errors from the two systems. > Becker $ ruby x =3D 0 begin raise ArgumentError if x =3D=3D 0 raise RuntimeError if x =3D=3D 1 rescue ArgumentError =3D> e puts e x =3D 1 retry rescue RuntimeError =3D> e puts e x =3D 2 retry end ArgumentError RuntimeError --=20 Eric Hodel - drbrain@segment7.net - http://segment7.net All messages signed with fingerprint: FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04 --cf0hFtnykp6aONGL Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQFBaCwkMypVHHlsnwQRAi+TAKCV3+J9fepwjstJHbQH2uxLdURc0ACgpsTx qndGqJiwEC0SEvAgM2gy+kw= =tzWx -----END PGP SIGNATURE----- --cf0hFtnykp6aONGL--