added missing CastError class