Move automatic catching pseudo code to a new class.