Issue #2225353 by tim.plunkett: Convert  to an object and provide methods like setError().