Skip to content

Commit

Permalink
better handling of invocationtargetexception (#968)
Browse files Browse the repository at this point in the history
* better handling of invocationtargetexception

* address review comments

* address review comments
  • Loading branch information
SrinivasanTarget authored Jul 5, 2018
1 parent 541eca8 commit 3c05402
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,16 @@ public Result createSession(HttpClient client, Command command)
return toReturn;
}).orElseThrow(() -> new SessionNotCreatedException(
format("Unable to create new remote session. desired capabilities = %s", desired)));
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
} catch (NoSuchMethodException | IllegalAccessException e) {
throw new WebDriverException(format("It is impossible to create a new session "
+ "because 'createSession' which takes %s, %s and %s was not found "
+ "or it is not accessible",
HttpClient.class.getSimpleName(),
InputStream.class.getSimpleName(),
long.class.getSimpleName()), e);
} catch (InvocationTargetException e) {
throw new SessionNotCreatedException(
format("Unable to create new remote session. Desired capabilities: %s", desired), e);
}
} finally {
os.reset();
Expand Down

0 comments on commit 3c05402

Please sign in to comment.