1
0
mirror of synced 2026-05-22 18:53:15 +00:00

fix(driver): set driver instance to null if an exception is thrown du… (#879)

This commit is contained in:
uchagani
2022-04-04 15:25:37 -04:00
committed by GitHub
parent 58013adfac
commit 447578c582
3 changed files with 27 additions and 7 deletions
@@ -55,8 +55,9 @@ public abstract class Driver {
instance = createDriver();
logMessage("initializing driver");
instance.initialize(env, installBrowsers);
logMessage("driver inialized.");
logMessage("driver initialized.");
} catch (Exception exception) {
instance = null;
throw new RuntimeException("Failed to create driver", exception);
}
}