mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 23:32:42 +01:00
merge changed from 18.11 into trunk.
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2151 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[[Property:modification_date|Thu, 06 Sep 2018 15:21:39 GMT]]
|
||||
[[Property:modification_date|Wed, 17 Apr 2019 14:09:18 GMT]]
|
||||
[[Property:publication_date|Thu, 06 Sep 2018 15:17:57 GMT]]
|
||||
[[Property:uuid|96077603-DD2D-4D8C-A486-AF4BD066613A]]
|
||||
[[Property:weight|2000]]
|
||||
@@ -18,7 +18,7 @@ The `across` can be used on every `ITERABLE` object (including `LIST` objects).
|
||||
end
|
||||
</code>
|
||||
|
||||
Note that the temporary variable (`ic` in the example) represent an iterator of the `ITERABLE` object, and not directly an element like in many other languages (like the `for` structure in Python for example).
|
||||
Note that the temporary variable (`ic` in the example) represents an iterator of the `ITERABLE` object, and not directly an element like in many other languages (like the `for` structure in Python for example).
|
||||
|
||||
=== the `from until` loop syntax===
|
||||
This syntax offer more possibilities than the `across` loop, but is riskier.
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
[[Property:modification_date|Wed, 17 Apr 2019 14:06:41 GMT]]
|
||||
[[Property:publication_date|Wed, 17 Apr 2019 14:02:25 GMT]]
|
||||
[[Property:uuid|5CA34C5D-30F1-4D6F-9FE4-B555E541EA8C]]
|
||||
[[Property:weight|4000]]
|
||||
[[Property:title|Managing CTRL+C in console application]]
|
||||
Normally, if the user use the CTRL+C keys, the Eiffel application detect it as an error and throw an exception of type <code>OPERATING_SYSTEM_SIGNAL_FAILURE</code>.
|
||||
Normally, if the user uses the CTRL+C keys, the Eiffel application detect it as an error and throw an exception of type <code>OPERATING_SYSTEM_SIGNAL_FAILURE</code>.
|
||||
|
||||
To manage the CTRL+C keys, you can use a <code>rescue</code> clause to detect the exception and a <code>retry</code> mecanism to cancel the exception handeling done by the Eiffel runtime.
|
||||
To manage the CTRL+C keys, you can use a <code>rescue</code> clause to detect the exception and a <code>retry</code> mechanism to cancel the exception handling done by the Eiffel runtime.
|
||||
|
||||
To detect the exception, you can <code>inherit</code> from the <code>EXCEPTIONS</code> class and use an attachment test on <code>Exception_manager.last_exception</code>.
|
||||
|
||||
Note that this code does not work on Windows. If used on Windows, the application will quit, but the <code>rescue</code> call is not launched.
|
||||
|
||||
<code>
|
||||
note
|
||||
description: "Show how to quit an application using CTRL+C (without trace)."
|
||||
|
||||
Reference in New Issue
Block a user