remove unnecessary TraitError class