In any case, you can probably store the URLs of the error pages for each site as element attributes /configuration/sitecore/sites/sitein web.config by extending the class Sitecore.Sites.SiteContext( see information on extending existing classes ).
SDN 404 /ItemNotFound, Sitecore.Sites.SiteContext.
ItemNotFoundUrl, , , 404. 404 , httpRequestBegin, 404 , null. , , Sitecore.Pipelines.HttpRequest.ExecuteRequest.HandleItemNotFound() Sitecore.Resources.Media.MediaRequestHandler.DoProcessRequest() web.config.
ErrorPage, , Sitecore.Pipelines.RenderLayout.SecurityCheck.Process web.config.
LayoutNotFoundUrl, , Sitecore.Pipelines.HttpRequest.ExecuteRequest.HandleLayoutNotFound web.config.
LinkItemNotFoundUrl , , renderField, , .
, Sitecore Shared Source .