/*
 * (C) Copyright 2017 Boni Garcia (http://bonigarcia.github.io/)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
package io.github.bonigarcia.handler;

import static io.github.bonigarcia.SeleniumJupiter.getBoolean;
import static org.slf4j.LoggerFactory.getLogger;
import static java.lang.invoke.MethodHandles.lookup;

import java.lang.reflect.Parameter;
import java.util.Optional;

import org.openqa.selenium.WebDriver;
import org.slf4j.Logger;

import io.github.bonigarcia.SeleniumJupiterException;

/**
 * Abstract resolver.
 *
 * @author Boni Garcia (boni.gg@gmail.com)
 * @since 1.2.0
 */
public abstract class DriverHandler {

    final Logger log = getLogger(lookup().lookupClass());

    boolean exceptionWhenNoDriver = getBoolean(
            "sel.jup.exception.when.no.driver");

    public abstract WebDriver resolve(Parameter parameter,
            Optional<Object> testInstance);

    void handleException(Exception e) {
        if (throwExceptionWhenNoDriver()) {
            throw new SeleniumJupiterException(e);
        }
        log.warn("Error creating WebDriver object", e);
    }

    boolean throwExceptionWhenNoDriver() {
        return exceptionWhenNoDriver;
    }

}

@@ -744,94 +744,94 @@
 tic 
-org.slf4j.LoggerFactory.getLogger;%0Aimport static java.lang.invoke.MethodHandles.lookup
+java.lang.invoke.MethodHandles.lookup;%0Aimport static org.slf4j.LoggerFactory.getLogger
 ;%0A%0Ai
@@ -1206,106 +1206,8 @@
 );%0A%0A
-    boolean exceptionWhenNoDriver = getBoolean(%0A            %22sel.jup.exception.when.no.driver%22);%0A%0A
     
@@ -1572,16 +1572,36 @@
  return 
+getBoolean(%22sel.jup.
 exceptio
@@ -1601,28 +1601,33 @@
 xception
-WhenNoD
+.when.no.d
 river
+%22)
 ;%0A    %7D%0A

Read configuration key to avoid exception when required