make error classes definitions more succinct