Rather create bogus but non-null errors, since some codepaths expect these. For example, see DocumentLoader::mainReceivedError.
Created attachment 27359 [details] nonnull-errors.patch
Comment on attachment 27359 [details] nonnull-errors.patch I think it would be nice and easy to make cancelledError return a cancellation - like it is done in emptyClients.
Created attachment 27363 [details] nonnull-errorsv2.patch
Comment on attachment 27363 [details] nonnull-errorsv2.patch r=me
Committed revision 40716.