Added exception classes. Replaced most of raising generic exceptions and except-all blocks