Normally the default error level is to display all except notices or even including notices in some cases. So if this is not changed it should be either logged to the webserver's logfile or to your display.
Are you talking about the same vhost where exec in custom errorpages is working and when you are trying to run your script? As you can influence / override some default settings on a vhost basis.
Another issue could be that exec is working but the code passed throguh is wrong. So do you see any difference when warpping a var_dump() around the exec part as exec returns the last line of the command's result.