@jacknagel Exception handling logic moved here.