Standardize and encapsulate exception handling into a single Error class.

Signed-off-by: Michael Pellon <michael@datafiniti.net>