Issue #2157691 by damiankloip: Move some helper methods in errors.inc to an Error utility class.