Is there something like a wildcard directive to catch all possible errors and deal with them in a single custom error page?
ErrorDocument 404 /error.php?code
Rather than passing in the error status code, you can pick it up in your script via the REDIRECT_STATUS environment variable (set by Apache). See: http://httpd.apache.org/docs/2.0/custom-error.html