added getexception functionality