[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ERRORLEVEL not set correctly on exception

brian.kejser

9/8/2006 5:04:00 PM

Hi

If I run the following code, then the DOS ERRORLEVEL is set to 1 as expected.

Timeout.timeout(1) { sleep(5) }

If I run the following code, then the DOS ERRORLEVEL is also set to 1 as
expected.

require 'test/unit'

class some_Test < Test::Unit::TestCase

def test_something
assert(false, "Failure")
end

end

If I run the following code, then the DOS ERRORLEVEL is set to 0.

require 'test/unit'

class some_Test < Test::Unit::TestCase

def test_something
Timeout.timeout(1) { sleep(5) }
end

end

Shouldn't the DOS ERRORLEVEL be 1 in the above case? Is this a bug or am I
missing something?

Thanks






1 Answer

Nobuyoshi Nakada

9/10/2006 11:36:00 AM

0

Hi,

At Sat, 9 Sep 2006 02:03:51 +0900,
brian.kejser@protexis.com wrote in [ruby-talk:213402]:
> If I run the following code, then the DOS ERRORLEVEL is set to 0.
>
> require 'test/unit'
>
> class some_Test < Test::Unit::TestCase
>
> def test_something
> Timeout.timeout(1) { sleep(5) }
> end
>
> end
>
> Shouldn't the DOS ERRORLEVEL be 1 in the above case? Is this a bug or am I
> missing something?

Timeout::Error wasn't caught. It was fixed yesterday.

--
Nobu Nakada