add exception class

* added an exception class - currently it's mostly delegating to runtime_error. but this can be functionally augmented at a later point.
* added some more checks in the ctor()
* fixed indentation.