summaryrefslogtreecommitdiffstats
path: root/llvm/docs/ProgrammersManual.rst
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/docs/ProgrammersManual.rst')
-rw-r--r--llvm/docs/ProgrammersManual.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/docs/ProgrammersManual.rst b/llvm/docs/ProgrammersManual.rst
index 7541f2eba8d..6ae72be426c 100644
--- a/llvm/docs/ProgrammersManual.rst
+++ b/llvm/docs/ProgrammersManual.rst
@@ -441,6 +441,14 @@ the program where they can be handled appropriately. Handling the error may be
as simple as reporting the issue to the user, or it may involve attempts at
recovery.
+.. note::
+
+ Ideally, the error handling approach described in this section would be
+ used throughout LLVM. However, this is not yet the case. For
+ non-programmatic errors where the ``Error`` scheme cannot easily be
+ applied, ``report_fatal_error`` should be used to call any installed error
+ handler and then terminate the program.
+
Recoverable errors are modeled using LLVM's ``Error`` scheme. This scheme
represents errors using function return values, similar to classic C integer
error codes, or C++'s ``std::error_code``. However, the ``Error`` class is
OpenPOWER on IntegriCloud