Added base exceptions

Base exceptions have been added to handle when the server refuses
connection or doesn't respond.
Will be changed later to provide more detail.
Added exception handling.

Handles the new exceptions and later will provide more functionality.