Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/tst/testlibgap/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 18.9.2025 mit Größe 749 B image not shown  

Quelle  trycatch.expect   Sprache: unbekannt

 
# Initializing GAP...
gap> OnBreak := false;;

gap> MakeReadWriteGVar("ERROR_OUTPUT");

gap> ERROR_OUTPUT := MakeImmutable("*stdout*");;

gap> Display(CALL_WITH_CATCH(function() return 314; end, []));;
1: Entering GAP_TRY section
2: Entering GAP_TRY section
2: Leaving GAP_TRY section
1: Leaving GAP_TRY section
[ true, 314 ]

gap> Display(CALL_WITH_CATCH(function() return [][1]; end, []));;
1: Entering GAP_TRY section
2: Entering GAP_TRY section
3: Entering GAP_TRY section
3: Leaving GAP_TRY section
Error, 3: Entering GAP_TRY section
3: Leaving GAP_TRY section
List Element: <list>[1] must have an assigned value3: Entering GAP_TRY section

3: Leaving GAP_TRY section
2: Caught error in GAP_TRY section
1: Leaving GAP_TRY section
[ false, 0 ]


[ Dauer der Verarbeitung: 0.25 Sekunden  (vorverarbeitet)  ]