Greetings,
A while ago I was reading a topic on Wikipedia or some other website discussing calling conventions and function return values.
If I recall correctly, I was under the impression that (in a High Level Language) if a function "throws" an exception, what really happens (on the low-level) is that a value is placed into a special register that the caller checks upon ret to see if an error number (anything besides zero) was passed.
However, I cannot find this info to confirm this or read more about it, and I'm sure you can understand that it is very hard to make Internet searches containing the words "error" or "exception" and find anything generic about how they work. Instead, all I can seem to find are results filled with people experiencing specific errors and exceptions.
So I was wondering if someone here could explain the error-throwing process (in general / or in brief) or help me find an informational topic about it. I am not an assembly programmer; I just have a curiosity in low-level programming and it's something I may try to learn in the future.
Thank you.