Skip to content

Commit 9343134

Browse files
dwalluckgoneall
authored andcommitted
Add cause to runtime exception
1 parent fc8affb commit 9343134

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/spdx/library/ListedLicenses.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,16 @@ private void initializeLicenseModelStore() {
118118
try {
119119
baseModelStore = new SpdxListedLicenseWebStore();
120120
} catch(InvalidSPDXAnalysisException ex) {
121-
logger.warn("Unable to access the most current listed licenses from https://spdx.org/licenses - using locally cached licenses: {} Note: you can set the org.spdx.useJARLicenseInfoOnly property to true to avoid this warning.", ex.getMessage());
121+
logger.warn("Unable to access the most current listed licenses from https://spdx.org/licenses - using locally cached licenses: {} Note: you can set the org.spdx.useJARLicenseInfoOnly property to true to avoid this warning.", ex.getMessage(), ex);
122122
baseModelStore = null;
123123
}
124124
}
125125
if (baseModelStore == null) {
126126
try {
127127
baseModelStore = new SpdxListedLicenseLocalStore();
128128
} catch(InvalidSPDXAnalysisException ex) {
129-
logger.error("Error loading cached SPDX licenses");
130-
throw new RuntimeException("Unexpected error loading SPDX Listed Licenses");
129+
logger.error("Error loading cached SPDX licenses", ex);
130+
throw new RuntimeException("Unexpected error loading SPDX Listed Licenses", ex);
131131
}
132132
}
133133
licenseStoreV2 = new SpdxV2ListedLicenseModelStore(baseModelStore);

0 commit comments

Comments
 (0)