appstate: Moved exceptions handling to Application()