changed IError to abstract class