Tabnine Logo
GenericPortableException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.guvnor.common.services.shared.exceptions.GenericPortableException
constructor

Best Java code snippets using org.guvnor.common.services.shared.exceptions.GenericPortableException.<init> (Showing top 11 results out of 315)

origin: org.kie.workbench.screens/kie-wb-common-datasource-mgmt-backend

@Override
public DriverDeploymentInfo getDriverDeploymentInfo(String uuid) {
  try {
    return runtimeManager.getDriverDeploymentInfo(uuid);
  } catch (Exception e) {
    throw new GenericPortableException(e.getMessage(),
                      e);
  }
}
origin: org.kie.workbench.screens/kie-wb-common-datasource-mgmt-backend

@Override
public DataSourceDeploymentInfo getDataSourceDeploymentInfo(String uuid) {
  try {
    return runtimeManager.getDataSourceDeploymentInfo(uuid);
  } catch (Exception e) {
    throw new GenericPortableException(e.getMessage(),
                      e);
  }
}
origin: org.uberfire/uberfire-services-api

  /**
   * Helper to return a @Portable RuntimeException.
   * @param e
   * @return
   */
  public static RuntimeException handleException(final Exception e) {
    logger.error("Exception thrown: " + e.getMessage(),
           e);
    if (EnvUtil.isPortableType(e.getClass())) {
      if (e instanceof RuntimeException) {
        return (RuntimeException) e;
      } else {
        return new GenericPortableException(e.getMessage(),
                          e);
      }
    }
    return new GenericPortableException(e.getMessage(),
                      e);
  }
}
origin: kiegroup/appformer

  /**
   * Helper to return a @Portable RuntimeException.
   * @param e
   * @return
   */
  public static RuntimeException handleException(final Exception e) {
    logger.error("Exception thrown: " + e.getMessage(),
           e);
    if (EnvUtil.isPortableType(e.getClass())) {
      if (e instanceof RuntimeException) {
        return (RuntimeException) e;
      } else {
        return new GenericPortableException(e.getMessage(),
                          e);
      }
    }
    return new GenericPortableException(e.getMessage(),
                      e);
  }
}
origin: org.guvnor/guvnor-services-api

  /**
   * Helper to return a @Portable RuntimeException.
   * @param e
   * @return
   */
  public static RuntimeException handleException(final Exception e) {
    logger.error("Exception thrown: " + e.getMessage(),
           e);
    if (EnvUtil.isPortableType(e.getClass())) {
      if (e instanceof RuntimeException) {
        return (RuntimeException) e;
      } else {
        return new GenericPortableException(e.getMessage(),
                          e);
      }
    }
    return new GenericPortableException(e.getMessage(),
                      e);
  }
}
origin: org.kie.workbench.screens/kie-wb-common-datasource-mgmt-backend

@Override
public DatabaseMetadata getMetadata(String dataSourceUuid,
                  boolean includeCatalogs,
                  boolean includeSchemas) {
  checkNotNull("dataSourceUuid",
         dataSourceUuid);
  try {
    DataSource dataSource = dataSourceRuntimeManager.lookupDataSource(dataSourceUuid);
    return DatabaseMetadataUtil.getMetadata(dataSource.getConnection(),
                        includeCatalogs,
                        includeSchemas);
  } catch (Exception e) {
    logger.error("It was not possible to get database metadata for data source: " + dataSourceUuid,
           e);
    throw new GenericPortableException("It was not possible to get database metadata for data source: "
                          + dataSourceUuid + ": " + e.getMessage(),
                      e);
  }
}
origin: org.kie.workbench.screens/kie-wb-common-datasource-mgmt-backend

  @Override
  public List<TableMetadata> findTables(String dataSourceUuid,
                     String schema,
                     String tableNamePattern,
                     DatabaseMetadata.TableType... types) {
    checkNotNull("dataSourceUuid",
           dataSourceUuid);
    checkNotNull("types",
           types);
    try {
      DataSource dataSource = dataSourceRuntimeManager.lookupDataSource(dataSourceUuid);
      return DatabaseMetadataUtil.findTables(dataSource.getConnection(),
                          schema,
                          tableNamePattern,
                          types);
    } catch (Exception e) {
      logger.error("It was not possible to get database metadata for data source: " + dataSourceUuid,
             e);
      throw new GenericPortableException("It was not possible to get database metadata for data source: "
                            + dataSourceUuid + ": " + e.getMessage(),
                        e);
    }
  }
}
origin: org.jbpm/jbpm-form-modeler-editor-client

@Test
public void errorPopupDisplayedWhenFormAlreadyExists() {
  when(fmServiceMock.createForm(any(Path.class), anyString()))
      .thenThrow(new GenericPortableException("File already exists."));
  testedHandler.create(packageMock, "existingForm", nrpresenterMock);
  verify(errorPopupMock).showMessage(CommonConstants.INSTANCE.SorryAnItemOfThatNameAlreadyExistsInTheRepositoryPleaseChooseAnother());
}
origin: org.drools/drools-wb-test-scenario-editor-backend

public TestScenarioResult run(final String identifier,
               final Scenario scenario,
               final KieModule module) {
  try {
    final HashMap<String, KieSession> ksessions = new HashMap<String, KieSession>();
    final String ksessionName = getKSessionName(scenario.getKSessions());
    ksessions.put(ksessionName,
           loadKSession(module,
                  ksessionName));
    final AuditLogger auditLogger = new AuditLogger(ksessions);
    final ScenarioRunner4JUnit scenarioRunner = new ScenarioRunner4JUnit(
        scenario,
        ksessions,
        getMaxRuleFirings());
    run(identifier,
      scenarioRunner,
      defaultTestResultMessageEvent);
    return new TestScenarioResult(scenario,
                   auditLogger.getLog());
  } catch (InitializationError initializationError) {
    throw new GenericPortableException(initializationError.getMessage());
  }
}
origin: kiegroup/drools-wb

public TestScenarioResult run(final String identifier,
               final Scenario scenario,
               final KieModule module) {
  try {
    final HashMap<String, KieSession> ksessions = new HashMap<String, KieSession>();
    final String ksessionName = getKSessionName(scenario.getKSessions());
    ksessions.put(ksessionName,
           loadKSession(module,
                  ksessionName));
    final AuditLogger auditLogger = new AuditLogger(ksessions);
    final ScenarioRunner4JUnit scenarioRunner = new ScenarioRunner4JUnit(
        scenario,
        ksessions,
        getMaxRuleFirings());
    run(identifier,
      scenarioRunner,
      defaultTestResultMessageEvent);
    return new TestScenarioResult(scenario,
                   auditLogger.getLog());
  } catch (InitializationError initializationError) {
    throw new GenericPortableException(initializationError.getMessage());
  }
}
origin: org.kie.workbench.screens/kie-wb-common-datasource-mgmt-backend

throw new GenericPortableException(e.getMessage());
org.guvnor.common.services.shared.exceptionsGenericPortableException<init>

Popular methods of GenericPortableException

    Popular in Java

    • Running tasks concurrently on multiple threads
    • onCreateOptionsMenu (Activity)
    • orElseThrow (Optional)
      Return the contained value, if present, otherwise throw an exception to be created by the provided s
    • getSupportFragmentManager (FragmentActivity)
    • System (java.lang)
      Provides access to system-related information and resources including standard input and output. Ena
    • ByteBuffer (java.nio)
      A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
    • Charset (java.nio.charset)
      A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
    • HashMap (java.util)
      HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
    • CountDownLatch (java.util.concurrent)
      A synchronization aid that allows one or more threads to wait until a set of operations being perfor
    • Join (org.hibernate.mapping)
    • Sublime Text for Python
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now