# Rescue

**URL:** <https://rubytalk.org/t/rescue/4924>\
**Category:** ruby-talk\
**Created:** [27 February 2003 09:38 UTC](https://rubytalk.org/t/rescue/4924 "2003-02-27T09:38:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel11](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@daniel11](https://rubytalk.org/u/daniel11)\
**Post date:** [27 February 2003 09:38 UTC](https://rubytalk.org/t/rescue/4924/1 "2003-02-27T09:38:51Z")

</div>

hello,

with this code  
–8\<—  
rescue SyntaxError, NameError, StandardError =\> boom  
print "\n\n Error: " + boom  
$stdin.gets  
exit  
end  
–8\<—

I’m able to react on most of all errors.

Sometimes in Win$ the console-window will be killed after  
a short time (with the error). How to avoid this to see the error?

daniel

---

<div class="post-metadata">

**Author:** ![Yukihiro\_Matsumoto2](https://avatars.discourse-cdn.com/v4/letter/y/b9e5f3/32.png) [@Yukihiro\_Matsumoto2](https://rubytalk.org/u/Yukihiro_Matsumoto2)\
**Post date:** [27 February 2003 10:08 UTC](https://rubytalk.org/t/rescue/4924/2 "2003-02-27T10:08:05Z")

</div>

Hi,

> **···**
>
> In message “rescue…” on 03/02/27, “daniel” [offstuff@aon.at](mailto:offstuff@aon.at) writes:
> 
> > with this code  
> > –8\<—  
> > rescue SyntaxError, NameError, StandardError =\> boom  
> > print "\n\n Error: " + boom  
> > $stdin.gets  
> > exit  
> > end  
> > –8\<—
> > 
> > I’m able to react on most of all errors.
> > 
> > Sometimes in Win$ the console-window will be killed after  
> > a short time (with the error). How to avoid this to see the error?
> 
> I’m not sure what’s your problem, but
> 
> rescue Exception =\> boom
> 
> must be much better to catch all errors.
> 
> ```
> matz.
> 
> ```

---

<div class="post-metadata">

**Author:** ![daniel11](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@daniel11](https://rubytalk.org/u/daniel11)\
**Post date:** [27 February 2003 23:02 UTC](https://rubytalk.org/t/rescue/4924/3 "2003-02-27T23:02:00Z")

</div>

Yukihiro Matsumoto [matz@ruby-lang.org](mailto:matz@ruby-lang.org) schrieb in im Newsbeitrag:  
1046340484.043991.1489.nullmailer@picachu.netlab.jp…

> Hi,
> 
> > Sometimes in Win$ the console-window will be killed after  
> > a short time (with the error

the error disappear with the console-window… ;-(

> […]  
> rescue Exception =\> boom  
> […]

that’s fine, thx!

daniel

> **···**
>
> > In message “rescue…” \> on 03/02/27, “daniel” [offstuff@aon.at](mailto:offstuff@aon.at) writes:
