summaryrefslogtreecommitdiff
path: root/Docs/04-errors
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2009-07-29 11:44:13 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2009-07-29 11:44:13 +0000
commit0d5c1eada9338fa4ae34a31745a5a9f82b352924 (patch)
tree8a9a678a1745e18792981f3509fadaed8adf0795 /Docs/04-errors
parent623808380ab44f58a588c83e7e857bba258d9e82 (diff)
downloadnetsurf-0d5c1eada9338fa4ae34a31745a5a9f82b352924.tar.gz
netsurf-0d5c1eada9338fa4ae34a31745a5a9f82b352924.tar.bz2
Remove the docs that have been moved to the wiki.
svn path=/trunk/netsurf/; revision=8889
Diffstat (limited to 'Docs/04-errors')
-rw-r--r--Docs/04-errors30
1 files changed, 0 insertions, 30 deletions
diff --git a/Docs/04-errors b/Docs/04-errors
deleted file mode 100644
index 786c46374..000000000
--- a/Docs/04-errors
+++ /dev/null
@@ -1,30 +0,0 @@
-Error handling
-==============
-
-This section describes error handling in the code.
-
-The most common serious error is memory exhaustion. If malloc(), strdup(), etc.
-fails, clean up and free any partially complete structures leaving data in a
-consistent state, and return a value which indicates failure, eg. 0 for
-functions which return a pointer (document the value in the function
-documentation). The caller should then propagate the failure up in the same way.
-At some point, the error should stop being passed up and be reported to the user
-using
-
- warn_user("NoMemory", 0);
-
-The other common error is one returned by a RISC OS SWI. Always use "X" SWIs,
-something like this:
-
- os_error *error;
- error = xwimp_get_pointer_info(&pointer);
- if (error) {
- LOG(("xwimp_get_pointer_info: 0x%x: %s\n",
- error->errnum, error->errmess));
- warn_user("WimpError", error->errmess);
- return false;
- }
-
-If an error occurs during initialisation, in most cases exit immediately using
-die(), since this indicates that there is already insufficient memory, or a
-resource file is corrupted, etc.