Exception handling added

Added TestFrameworkException in a provisional way, it will be
fixed during integration. Trimmed down debug code, too.

Signed-off-by: Raffaele Aquilone <aquiloneraf@gmail.com>