Then you just passed them during function call, e.g. "handle = open_file(input_file_name, open_flags, FailedToOpenInputFile);"
The error handlers at the end of the body of the invoking function were just labelled appropriately.
Writing a label like FailedToOpenInputFile: before an error handler is certainly much simpler and more obvious than strange workarounds for exception identification, like inventing a dedicated data type for each possible error, as in C++.