File tree 1 file changed +6
-2
lines changed
src/main/java/com/datadoghq/workshops/samplevulnerablejavaapp
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,13 @@ public String testDomain(String domainName) throws DomainTestException {
35
35
}
36
36
return new String (process .getInputStream ().readAllBytes (), StandardCharsets .UTF_8 );
37
37
} catch (IOException e ) {
38
- throw new UnableToTestDomainException ("Internal error while testing domain: " + e .getMessage ());
38
+ DomainTestException dte = new UnableToTestDomainException ("Internal error while testing domain: " + e .getMessage ());
39
+ dte .initCause (e );
40
+ throw dte ;
39
41
} catch (InterruptedException e ) {
40
- throw new UnableToTestDomainException ("Timed out pinging domain" );
42
+ DomainTestException dte = new UnableToTestDomainException ("Timed out pinging domain" );
43
+ dte .initCause (e );
44
+ throw dte ;
41
45
}
42
46
}
43
47
You can’t perform that action at this time.
0 commit comments