[M3devel] RuntimeException catching broken? Re: assertion failure in RTCollector

Olaf Wagner wagner at elegosoft.com
Mon Mar 10 00:38:29 CET 2008


Please forget my last message. It seems I accidentally broke this myself
some weeks ago while working on FreeBSD PTHREADS and committing too much
(changes that were only temporary work-arounds).

The test program should work again now.

Quoting Olaf Wagner <wagner at elegosoft.com>:

> Now for somethings completely different ;-)
>
> I've written this simple test program to verify Dragisa's report
> about not-working runtime exceptions:
>
> MODULE Main;
>
> IMPORT RuntimeError, IO, Process;
>
> CONST Tag = RuntimeError.Tag;
>
> PROCEDURE CatchAssert() =
>   BEGIN
>     TRY
>       <*ASSERT FALSE*>
>     EXCEPT
>       RuntimeError.E( t ) =>
>       IO.Put( "OK: caught RuntimeError.Assert: " & Tag( t ) & "\n" );
>     END;
>   END CatchAssert;
>
> PROCEDURE TestAll() =
>   BEGIN
>     CatchAssert();
>   END TestAll;
>
> BEGIN
>   TRY
>     TestAll();
>   EXCEPT
>   ELSE
>     IO.Put( "ERROR: caught unexpected exception\n" );
>     Process.Exit( 1 );
>   END;
> END Main.
>
> As he has reported, the exception is not caught. I've tried the debugger
> and set breakpoints at RTHooks.Raise() and RTHooks.AssertFailed(), but
> it did never stop there.
>
> Any ideas what's wrong there? You probably know better than me how
> exceptions are implemented.
>
> For today, I think I'll add that program as p208 to m3tests and then
> turn my attention to dinner :-)
>
> Olaf
> -- 
> Olaf Wagner -- elego Software Solutions GmbH
>                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
> phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
>    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
> Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194



-- 
Olaf Wagner -- elego Software Solutions GmbH
                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194




More information about the M3devel mailing list