add exception handler for platform