Update wikipage Managing CTRL+C on console. (Signed-off-by:tioui).

git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@1994 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
eiffel-org
2018-04-30 00:03:28 +00:00
parent e59451561c
commit 8412dd575e

View File

@@ -2,7 +2,11 @@
[[Property:weight|0]] [[Property:weight|0]]
[[Property:title|Managing CTRL+C on console]] [[Property:title|Managing CTRL+C on console]]
[[Property:link_title|CTRL_C terminal]] [[Property:link_title|CTRL_C terminal]]
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>. 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. 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>.
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 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>.
<code> <code>
note note