Code example for ConsoleMessage

Methods: lineNumber, message, messageLevel, sourceId

0
        mOnReceivedErrorHelper.notifyCalled(errorCode, description, failingUrl);
    } 
 
    @Override 
    public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
        mAddMessageToConsoleHelper.notifyCalled(consoleMessage.messageLevel().ordinal(),
                consoleMessage.message(), consoleMessage.lineNumber(), consoleMessage.sourceId());
        return false; 
    } 
 
    public static class AddMessageToConsoleHelper extends CallbackHelper { 
        private int mLevel;
        private String mMessage;
        private int mLineNumber;
        private String mSourceId;
 
        public int getLevel() { 
            assert getCallCount() > 0; 
            return mLevel;
        }