Send an Error Event

  1. Report an Error Event using the API.
    try {
        //Force creating an exception
        float f = (5 / 0);   
    } catch (Throwable t) {
        Instrumentation.addErrorEvent(t, Instrumentation.Severity.ALERT);
    }
  2. Send all the events to the EUM Server. This is a blocking call. The application can send it on a separate thread.
    Instrumentation.sendAllEvents();