Replace Error class with ErrorX module