What is an error stack trace?


What is an error stack trace? I think it has something to do with ‘stack and heap’ but i’m not sure.

It is not presumable that people know what an ‘error stack trace’ means.

Thanks in advance.

When a program is running it’s likely to be calling different functions, libraries, other programs, etc.
It keeps track of where it is by adding each call to a stack trace and then popping them off when it’s done with that bit. That way, when the program hits an error it can show you what it was doing, and where it was when it broke.

For instance, you could have a program that gives an error whilst in a function but when you check, the function seems fine.
The trace means you could see where it was called from and track the error back up from there.

Hope that helps

1 Like

Okay, thanks for the info.