Creates an MalformedURLException with a message and a cause.

@param message exception message
@param cause   exception cause

@throws MalformedURLException the created MalformedURLException
430480
private static void throwAsMalformedURLException( final String message, final Exception cause )
        throws MalformedURLException
    {
        final MalformedURLException exception = new MalformedURLException( message );
        exception.initCause( cause );
        throw exception;
    }
185495
public void reportError (String message, Throwable cause) {
    errors.emit(new Error(message, cause));
    log().warn(message, cause);
  }
812960
public void error(Object message) {
        log(Level.SEVERE, String.valueOf(message), null);
    }
588735
private void addInfoForNoSuchElementException(NoSuchElementException cause) {
        if (parent == null) {
            throw cause;
        }

        BasicPageImpl page = this.parent.getCurrentPage();

        if (page == null) {
            throw cause;
        }

        String resolvedPageName = page.getClass().getSimpleName();

        // Find if page exists: This part is reached after a valid page instance is assigned to page variable. So its
        // safe to proceed!

        boolean pageExists = page.hasExpectedPageTitle();
        if (!pageExists) {
            // ParentType: Page does not exist: Sending the cause along with it
            throw new ParentNotFoundException(resolvedPageName + " : With Page Title {" + page.getActualPageTitle()
                    + "} Not Found.", cause);
        }
        // The page exists. So lets prepare a detailed error message before throwing the exception.

        StringBuilder msg = new StringBuilder("Unable to find webElement ");

        if (this.controlName != null) {
            msg.append(this.controlName).append(" on ");
        }

        if (resolvedPageName != null) {
            msg.append(resolvedPageName);
        }

        msg.append(" using the locator {").append(locator).append("}");
        throw new NoSuchElementException(msg.toString(), cause);
    }
680370
void logError(final String message) {
      if(logger != null) {
         try {
            StringBuilder buf = new StringBuilder(name);
            buf.append(":");
            buf.append(message);
            logger.error(buf.toString());            
         } catch(Throwable t) {
            //Ignore - logging should not kill anything
         }
      }
   }
251919
public final void infoDebug(final Throwable cause, final String message)
    {
        logDebug(Level.INFO, cause, message);
    }
813539
static void throwSSLException(String msg, Throwable cause)
            throws SSLException {
        SSLException e = new SSLException(msg);
        e.initCause(cause);
        throw e;
    }
824535
public static void error(Object source, String message, Throwable t) {
		LoggerFactory.getInstance().log(LoggerLevel.ERROR, source, message, t);
	}
638646
public void add(String message, IOException cause) {
        causes.add(new IOException(message, cause));
    }
960846
private void initMessage(HttpMessage message) {
        StaticMessageContentBuilder staticMessageContentBuilder = StaticMessageContentBuilder.withMessage(message);
        staticMessageContentBuilder.setMessageHeaders(message.getHeaders());
        getAction().setMessageBuilder(new HttpMessageContentBuilder(message, staticMessageContentBuilder));
    }
388006
public void error(String message, Object... args) {
    error(String.format(message, args), getThrowable(args));
  }
569171
final void add(Level level, String message)
        throws NullPointerException, IllegalArgumentException {

        add(Message.create(level, message));
    }
1066504
public void exception(CharSequence message, Throwable e) {
    log(Level.SEVERE, message, e);
  }
1071461
public static void exception(String message, Throwable e) {
    if(message == null && e != null) {
      message = e.getMessage();
    }
    logExpensive(Level.SEVERE, message, e);
  }
698918
public void error(Object message, Throwable exception) {
    log(Level.ERROR, message, exception);
  }
779109
private IOException syntaxError(String message) throws IOException {
    throw new MalformedJsonException(message
        + " at line " + getLineNumber() + " column " + getColumnNumber() + " path " + getPath());
  }
252811
public IStatus createStatus(int severity, String message, Throwable cause) {
		return createStatus(severity, 0, message, cause);
	}