{
          Diagnostic diagnostic = null;
          if (resourceDiagnostic instanceof Throwable)
          {
            diagnostic = BasicDiagnostic.toDiagnostic((Throwable)resourceDiagnostic);
          }
          else
          {
            diagnostic = new BasicDiagnostic(
              Diagnostic.WARNING,
              "org.eclipse.emf.ecore.resource", 
              0, 
              resourceDiagnostic.getMessage(),
              new Object[]{resourceDiagnostic});
          }
          basicDiagnostic.add(diagnostic);
        }