This patch replaces the existing C-style error codes with C++ exceptions. Fixes #895
This directory contains all source codes.