What's Ruby for the following?

```
if executing the next line wouldn't cause any kind of error then
  execute this line
elsif executing the next line wouldn't cause any kind of error then
  execute this line
else

```

I've been reading the API pages for rescue and exceptions and eval but so far have failed in my quest.

Many thanks,

Steven.

---

Following on from a [comment](http://twitter.com/assaf/statuses/3930094823) from Assaf Arkin, I'm going to suggest the following syntax:

```
if first_condition
 execute_this_line rescue nil
elsif second_condition
 execute_that_line rescue nil
end

```

Will the result be as follows?

> 
> If first\_condition is true and it's
>  possible to execute\_this\_line without
>  error, then it will execute\_this\_line.
> 
> 
> If first\_condition is true and
>  execute\_this\_line normally generates
>  an error, it will jump to end.
> 
> 
> If first-condition is false, it will
>  test second\_condition.
> 
> 
> If second\_condition is true and it's
>  possible to execute\_that\_line without
>  error, then it will execute\_that\_line.
> 
> 
> Otherwise it will jump to end.
> 
> 
>