gap-system

How do you see the full "called from" chain of function calls after an error?


Upon getting an error in the GAP command line interpreter, the chain of function calls that led to the error get's truncated, so I can see the start of the chain, which is the function I'd need to fix.

gap> MyAwesomeFunction(x,y);
Error, resulting list would be too large (length infinity) called from
ConstantTimeAccessList( enum ) at /path/to/gap/lib/coll.gi:506 called from
AsList( l ) at /path/to/gap/lib/list.gi:612 called from
AsPlist( l ) at /path/to/gap/lib/list.gi:673 called from
EnumeratorSorted( Enumerator( D ) ) at /path/to/gap/lib/domain.gi:231 called from
EnumeratorSorted( C ) at /path/to/gap/lib/coll.gi:862 called from
...  at line 4 of *stdin*
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
brk>

How do I tell GAP to show me the full chain of functions here? What's behind that ...?


Solution

  • As per Alexander Konovalov's comment, the Where function is the key here. Entering Where(42) in the break look will show up to 42 functions in this "called from" chain.