protected override void WriteExceptionError(Exception exception)
{
if (exception is CloudException)
{
// Override the default error message into a formatted message which contains Request Id
exception = ((CloudException)exception).CreateFormattedException();
}
else if (exception is ArgumentOutOfRangeException)
{
// Add resource naming rules page link into a formatted message
exception = ((ArgumentOutOfRangeException)exception).CreateFormattedException();
}
base.WriteExceptionError(exception);
}