generic error class

still needs documentation and throwSelf()