Make exception handling 2.5-compatible (Closes #223)