Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- note
- description: "Montre comment fermer un application avec CTRL+C sans exception."
- autheur: "Louis Marchand"
- date: "Wed, 25 Apr 2018 23:12:33 +0000"
- revision: "0.1"
- class
- APPLICATION
- inherit
- EXCEPTIONS
- create
- make
- feature {NONE} -- Initialisation
- make
- -- Exécute l'application.
- local
- l_ctrl_c:BOOLEAN
- do
- if not l_ctrl_c then
- from until False loop
- io.standard_default.put_string ("Appuyez sur CTRL+C%N")
- io.input.read_line
- end
- else
- io.standard_default.put_string ("%NFermeture...%N")
- end
- rescue
- if attached {OPERATING_SYSTEM_SIGNAL_FAILURE} Exception_manager.last_exception then
- l_ctrl_c := True
- retry
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement