POV-Ray : Newsgroups : povray.off-topic : Funniest bug ever Server Time
29 Jul 2024 06:28:37 EDT (-0400)
  Funniest bug ever (Message 10 to 19 of 49)  
<<< Previous 9 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Orchid Win7 v1
Subject: Re: Funniest bug ever
Date: 24 Feb 2013 06:52:27
Message: <5129fefb@news.povray.org>
On 24/02/2013 12:06 AM, Warp wrote:
> All programs should return an error code if an error happens. If a program
> ends in error but returns a success code, that program is broken

I agree. However, unfortunately it seems that by default Bash ignores 
all such errors and happily proceeds, unless you manually suffix every 
single command with an explicit return-code check.


Post a reply to this message

From: Orchid Win7 v1
Subject: Re: Funniest bug ever
Date: 24 Feb 2013 06:52:57
Message: <5129ff19$1@news.povray.org>
On 23/02/2013 07:56 PM, nemesis wrote:
> fun indeed
>
> I mean, to put a windoze guy on charge of Linux stuff :)

I love that everybody else in the room is LPIC-certified, yet I'm the 
one doing the crazy Linux stuff. ;-)


Post a reply to this message

From: Orchid Win7 v1
Subject: Re: Funniest bug ever
Date: 24 Feb 2013 06:53:46
Message: <5129ff4a$1@news.povray.org>
On 23/02/2013 10:24 PM, Francois Labreque wrote:

> 1. Redirect stderr to a different file. And check for that file being
> more than 0 bytes before claiming the install completed succesfully.

Ooo, here's an interesting question - what is the size of /dev/sda? Is 
it the size of the special file, or the device to which it refers?


Post a reply to this message

From: Warp
Subject: Re: Funniest bug ever
Date: 24 Feb 2013 07:03:06
Message: <512a017a@news.povray.org>
Orchid Win7 v1 <voi### [at] devnull> wrote:
> I agree. However, unfortunately it seems that by default Bash ignores 
> all such errors and happily proceeds, unless you manually suffix every 
> single command with an explicit return-code check.

How is that different from any programming language?

-- 
                                                          - Warp


Post a reply to this message

From: Orchid Win7 v1
Subject: Re: Funniest bug ever
Date: 24 Feb 2013 07:21:43
Message: <512a05d7$1@news.povray.org>
On 24/02/2013 12:03 PM, Warp wrote:
> Orchid Win7 v1<voi### [at] devnull>  wrote:
>> I agree. However, unfortunately it seems that by default Bash ignores
>> all such errors and happily proceeds, unless you manually suffix every
>> single command with an explicit return-code check.
>
> How is that different from any programming language?

In C#, Java or similar, if you try to open a file and can't, an 
exception is thrown, and your program is halted. (Unless you thought of 
that eventuality and coded a catch{} block for it.) In Bash, the program 
continues to execute as if everything worked just fine, silently 
ignoring the error.


Post a reply to this message

From: clipka
Subject: Re: Funniest bug ever
Date: 24 Feb 2013 12:00:25
Message: <512a4729@news.povray.org>
Am 24.02.2013 12:52, schrieb Orchid Win7 v1:
> On 24/02/2013 12:06 AM, Warp wrote:
>> All programs should return an error code if an error happens. If a
>> program
>> ends in error but returns a success code, that program is broken
>
> I agree. However, unfortunately it seems that by default Bash ignores
> all such errors and happily proceeds, unless you manually suffix every
> single command with an explicit return-code check.

#!/bin/bash -e

Have fun!


Post a reply to this message

From: Jim Henderson
Subject: Re: Funniest bug ever
Date: 24 Feb 2013 14:47:58
Message: <512a6e6e$1@news.povray.org>
On Sun, 24 Feb 2013 11:53:05 +0000, Orchid Win7 v1 wrote:

> On 23/02/2013 07:56 PM, nemesis wrote:
>> fun indeed
>>
>> I mean, to put a windoze guy on charge of Linux stuff :)
> 
> I love that everybody else in the room is LPIC-certified, yet I'm the
> one doing the crazy Linux stuff. ;-)

Just goes to show that certification doesn't always mean "expert".  As 
I've said before, a cert is a measure of the minimally-qualified 
candidate. :)

Well done. :)

Jim


Post a reply to this message

From: Jim Henderson
Subject: Re: Funniest bug ever
Date: 24 Feb 2013 14:49:48
Message: <512a6edc$1@news.povray.org>
On Sun, 24 Feb 2013 12:21:51 +0000, Orchid Win7 v1 wrote:

> On 24/02/2013 12:03 PM, Warp wrote:
>> Orchid Win7 v1<voi### [at] devnull>  wrote:
>>> I agree. However, unfortunately it seems that by default Bash ignores
>>> all such errors and happily proceeds, unless you manually suffix every
>>> single command with an explicit return-code check.
>>
>> How is that different from any programming language?
> 
> In C#, Java or similar, if you try to open a file and can't, an
> exception is thrown, and your program is halted. (Unless you thought of
> that eventuality and coded a catch{} block for it.) In Bash, the program
> continues to execute as if everything worked just fine, silently
> ignoring the error.

The exception handling part is a feature of OO programming languages, 
IIRC.  Bash scripting is far from OOP. ;)

Jim


Post a reply to this message

From: Orchid Win7 v1
Subject: Re: Funniest bug ever
Date: 24 Feb 2013 15:00:56
Message: <512a7178$1@news.povray.org>
>> I agree. However, unfortunately it seems that by default Bash ignores
>> all such errors and happily proceeds, unless you manually suffix every
>> single command with an explicit return-code check.
>
> #!/bin/bash -e
>
> Have fun!

I think you mean "set -e", but anyway...


Post a reply to this message

From: Orchid Win7 v1
Subject: Re: Funniest bug ever
Date: 24 Feb 2013 15:01:48
Message: <512a71ac$1@news.povray.org>
> The exception handling part is a feature of OO programming languages,
> IIRC.  Bash scripting is far from OOP. ;)

I think exception handling predates OO. But whatever; Bash is a 
_scripting language_. It is meant for writing short, simple scripts, but 
building large, complex, mission-critical applications.


Post a reply to this message

<<< Previous 9 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.