Skip to content

Commit

Permalink
log exception instead of throwing
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Rueger <[email protected]>
  • Loading branch information
chrisrueger committed Jun 29, 2024
1 parent 8bcdf1f commit 7748048
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import aQute.bnd.build.Container.TYPE;
import aQute.bnd.build.Project;
import aQute.bnd.build.Run;
import aQute.bnd.exceptions.Exceptions;
import aQute.bnd.exceptions.SupplierWithException;

public class BndrunDirectiveSourceContainer extends CompositeSourceContainer {
Expand Down Expand Up @@ -119,15 +118,19 @@ protected ISourceContainer[] createSourceContainers() {
// interested in bundles added via
// '-includeresource:
// ${repo;bsn;latest}'
if (TYPE.REPO == bp.getType()) {
if (bp != null && TYPE.REPO == bp.getType()) {
additionalSourceContainers
.add(new BundleSourceContainer(bp));
}


}
} catch (Exception e) {
throw Exceptions.duck(e);
// just log to avoid that
// exceptions interrupt everything else
logger.logError("SourceContainers: Error adding buildpath dependencies of bundle "
+ targetProjName,
e);
}

IJavaProject targetJavaProj = JavaCore.create(targetProj);
Expand Down

0 comments on commit 7748048

Please sign in to comment.