- EC06F5D03656946C1D7F682FA5192EF8BD3C8D460E5BD8B9F0DC1DE36B6AA549F1B8FE1E0525D3A660C8A8AB1928AA05868359EC4B838D2D951C5FF672B2D93E
+
zfp/adainclude/last_chance_handler.adb
(1 . 38)(0 . 0)
358 ------------------------------------------------------------------------------
359 ------------------------------------------------------------------------------
360 -- You do not have, nor can you ever acquire the right to use, copy or --
361 -- distribute this software ; Should you use this software for any purpose, --
362 -- or copy and distribute it to anyone or in any manner, you are breaking --
363 -- the laws of whatever soi-disant jurisdiction, and you promise to --
364 -- continue doing so for the indefinite future. In any case, please --
365 -- always : read and understand any software ; verify any PGP signatures --
366 -- that you use - for any purpose. --
367 -- --
368 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
369 ------------------------------------------------------------------------------
370 ------------------------------------------------------------------------------
371
372 with Ada.Text_IO; use Ada.Text_IO;
373 with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
374 with System.Storage_Elements; use System.Storage_Elements;
375 with System.Syscall; use System.Syscall;
376
377 procedure Last_Chance_Handler (Msg : System.Address; Line : Integer) is
378 function Peek (Addr : System.Address) return Character is
379 C : Character with
380 Address => Addr;
381 begin
382 return C;
383 end Peek;
384 A : System.Address := Msg;
385 begin
386 Put ("GNAT Exception!:");
387 Put (Line);
388 Put (":");
389 while Peek (A) /= ASCII.NUL loop
390 Put (Peek (A));
391 A := A + 1;
392 end loop;
393 New_Line;
394 Sys_Exit (1);
395 end Last_Chance_Handler;