예제 #1
0
  private ComponentInstantiationException makeException(
      ClassRealm componentClassRealm,
      ComponentDescriptor componentDescriptor,
      Class implementationClass,
      Throwable e) {
    // ----------------------------------------------------------------------
    // Display the realm when there is an error, We should probably return a string here so we
    // can incorporate this into the error message for easy debugging.
    // ----------------------------------------------------------------------

    componentClassRealm.display();

    String msg = "Could not instanciate component: " + componentDescriptor.getHumanReadableKey();

    return new ComponentInstantiationException(msg, e);
  }