system_error refactoring.