Ported HttpWarning and exception handling.