Added API for client-side interception and handling of exceptions.