/** * Logs error message. * * @param message Error message. */ public void log(String message) { log(createErrorStatus(message)); }
/** * Logs and exception. * * @param e Exception. */ public void log(Throwable e) { log(createErrorStatus(e)); }
/** * Logs an error message with an exception. * * @param e Exception. */ public void log(String message, Throwable e) { log(createErrorStatus(message, e)); }
EditorCorePlugin.getDefault().log(e); return null;
public static int getConnectionId(DatabaseIdentifier databaseIdentifier, Connection conn) { if (databaseIdentifier == null || conn == null) { return 0; } try { if (conn.isClosed()) { return 0; } } catch (SQLException e) { EditorCorePlugin.getDefault().log(e); } ConnectionService service = getConnectionService(databaseIdentifier); return service.getConnectionId(databaseIdentifier, conn); }
/** * Returns a connection from the connection layer * * @param profileName * @param dbName * @return jdbc connection * @see #createConnection(IConnectionProfile, String) */ public static Connection createConnection(String profileName, String dbName) { try { Connection conn = createConnection(getProfile(profileName), dbName); return conn; } catch (NoSuchProfileException e) { EditorCorePlugin.getDefault().log(e); return null; } }
EditorCorePlugin.getDefault().log(e1); return list;
/** * Disposes the resources. Child class can override this method, but * normally should call super.dispose() */ protected void dispose() { try { IConnectionProfile profile = ProfileUtil .getProfile(_databaseIdentifier.getProfileName()); IManagedConnection managedConn = profile .getManagedConnection("java.sql.Connection"); managedConn.removeConnectionListener(_managedConnectionListener); } catch (NoSuchProfileException e) { //ignore, this happens when the connection profile is deleted } catch (Exception e) { EditorCorePlugin.getDefault().log(e); } }
EditorCorePlugin.getDefault().log(NLS.bind(Messages.DefaultSQLSyntax_exception_splitSQL, sql), e1);
EditorCorePlugin.getDefault().log(NLS.bind(Messages.ProfileUtil_error_create_connection, (new Object[]{profile.getName()})),e); return null;
EditorCorePlugin.getDefault().log(e);
public static String getProfileName(IVirtualNode _node) { ConnectionInfo conInfo = _node.getParentConnection(); Object parent = _node.getParent(); if(!(conInfo instanceof ConnectionInfoImpl) && parent instanceof ICatalogObject) { Database db = ((ICatalogObject)parent).getCatalogDatabase(); conInfo = DatabaseConnectionRegistry.getInstance() .getConnectionForDatabase(db); if (conInfo == null) { EditorCorePlugin.getDefault().log(Messages.error_cannot_get_connection_profile); return null; } } String profileName = ((ConnectionInfoImpl)conInfo).getConnectionProfile().getName(); return profileName; }
EditorCorePlugin.getDefault().log(e);
EditorCorePlugin.getDefault().log(e);
/** * Constructs an AbstractControlConnection. * * @param manager * {@link EditorCorePlugin#getControlConnectionManager()} * @param databaseIdentifier * contains connection profile info and database name */ public AbstractControlConnection(IControlConnectionManager manager, DatabaseIdentifier databaseIdentifier) { Assert.isTrue(manager instanceof ControlConnectionManager); this._manager = (ControlConnectionManager) manager; this._databaseIdentifier = databaseIdentifier; try { IConnectionProfile profile = ProfileUtil .getProfile(databaseIdentifier.getProfileName()); IManagedConnection managedConn = profile .getManagedConnection("java.sql.Connection"); _managedConnectionListener = new SQLToolsManagedConnectionListener(); managedConn.addConnectionListener(_managedConnectionListener); } catch (Exception e) { EditorCorePlugin.getDefault().log(e); } }
EditorCorePlugin.getDefault().log(ce);
EditorCorePlugin.getDefault().log( NLS.bind(Messages.ProfileUtil_error_getdriver, (new Object[] { profile.getName() })));
EditorCorePlugin.getDefault().log(e);