code: public void onError(def<Void> handler) {
                  while (!inProcess) {
                          // block
                          Style.sleep(1);
                  }
                  synchronized (lock) {
                          this.handler = handler;
                          if (err != null) {
                                  handler.apply(err);
                          }
                  }
          }
docs: Handle exceptions that callback function thrown.<br>
  if there's already an exception thrown when this method invoked, the
  handling process would be taken in current thread.<br>
  Otherwise, the process would be taken at callback thread when
  exception occurred.
  
  @param handler a function to invoke when occurred an exception<br>
  for all Throwable caught from the callback function
  would be packed into StyleRuntimeException
  @see StyleRuntimeException