Skip to content

Commit

Permalink
#38 More logging tweaking
Browse files Browse the repository at this point in the history
  • Loading branch information
rjrudin committed Dec 1, 2016
1 parent cdfe441 commit a1de05f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public abstract class AbstractStaticChecker extends LoggingObject implements Sta

@Override
public void checkLoadedAssets(List<LoadedAsset> assets) {
if (assets == null || assets.isEmpty()) {
return;
}
if (bulkCheck) {
performBulkStaticCheck(assets);
} else {
Expand Down Expand Up @@ -89,7 +92,7 @@ protected void performBulkStaticCheck(List<LoadedAsset> assets) {
protected String buildXqueryForStaticallyCheckingModule() {
String xquery =
"try { xdmp:invoke($uri, (), <options xmlns='xdmp:eval'><static-check>true</static-check></options>) } " +
"catch ($e) { " +
"catch ($e) { xdmp:log($e), " +
"if ($e/*:code = 'XDMP-NOEXECUTE') then () " +
"else if ($e/*:code = 'XDMP-EVALLIBMOD') then ";
if (checkLibraryModules) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ protected void loadAssets(Modules modules, Set<File> loadedModules) {
files = restApiAssetLoader.loadAssets(paths);
} else if (xccAssetLoader != null) {
List<LoadedAsset> list = xccAssetLoader.loadAssetsViaXcc(paths);
if (staticChecker != null) {
if (staticChecker != null && !list.isEmpty()) {
try {
staticChecker.checkLoadedAssets(list);
} catch (RuntimeException ex) {
Expand Down

0 comments on commit a1de05f

Please sign in to comment.