Added returncodes for pych commands.
Added chained exceptions for compilation-errors.