code: @SuppressWarnings({"unused", "WeakerAccess"})
      public void pushError(final String errorMessage, final int errorCode) {
          final HashMap<String, Object> props = new HashMap<>();
          props.put("Error Message", errorMessage);
          props.put("Error Code", errorCode);
  
          try {
              final String activityName = getCurrentActivityName();
              if (activityName != null) {
                  props.put("Location", activityName);
              } else {
                  props.put("Location", "Unknown");
              }
          } catch (Throwable t) {
              // Ignore
              props.put("Location", "Unknown");
          }
  
          pushEvent("Error Occurred", props);
      }
docs: Internally records an "Error Occurred" event, which can be viewed in the dashboard.
  
  @param errorMessage The error message
  @param errorCode    The error code