Debugging by contract

20 views
Skip to first unread message

jacques silberstein

unread,
Feb 13, 2025, 10:08:51 AMFeb 13
to Eiffel Users

in version 25.02

When I run from a terminal :

EIFGENs/resource/W_code/resource data/resources.dmp allocate 12 23/05/2025 26/05/2025 MAS_C15 -comment="option Montantème"
exception: Precondition violated.

But which precondition ? To know the answer I have to run from estudio who give my :

index_is_valid: PRECONDITION_VIOLATION raised

But, debugging by contract, I should receive then answer directly. If I remember well, that was the case before, isn't ?

-- 

Cordialement

Jacques Silberstein

Jocelyn Fiat

unread,
Feb 17, 2025, 10:19:15 AMFeb 17
to eiffel...@googlegroups.com
The output looks weird to me.
Are you sure you don't rescue the exception and output yourself the message "exception: Precondition violated"
As usual the trace looks like

******************************* Thread exception *****************************
In thread           Root thread            0x0 (thread id)
*******************************************************************************
-------------------------------------------------------------------------------
Class / Object      Routine                Nature of exception           Effect
-------------------------------------------------------------------------------
APP                 test @1                i_valid:                    
<00007580015FE558>                         Precondition violated.        Fail
...

in this case, the code has a precondition "i_valid" violation on APP.test  

But, debugging by contract, I should receive then answer directly. If I remember well, that was the case before, isn't ?

Yes, and it is still the case, that's why I suspect the exception to be rescued by your code.
in EiffelStudio, what happens if you continue the execution ?


--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/eiffel-users/8b8e0447-eaac-486c-8841-3599987e3da3%40abstraction.ch.


--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages