docs: private void serializePreviousException() {
          try {
              final ByteArrayOutputStream bas = new ByteArrayOutputStream();
              ObjectOutputStream oos = (ObjectOutputStream) AccessController.doPrivileged(new PrivilegedExceptionAction() {
                  @Override
                  public Object run() throws IOException {
                      return new ObjectOutputStream(bas);
                  }
              });
              oos.writeObject(previousExceptionObject);
              previousException = bas.toByteArray();
          } catch (PrivilegedActionException pae) {
              pae.getException().printStackTrace();
          } catch (Exception e) {
              e.printStackTrace();
          }
      }