Skip to content

Commit d47a4d8

Browse files
author
jan
committed
getRecipes:Github build provides stackTrace adding status to investigate
1 parent 52d52ad commit d47a4d8

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

io.sloeber.autoBuild/src/io/sloeber/autoBuild/extensionPoint/providers/AutoBuildMakeRule.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@
3131
import org.eclipse.core.resources.IFolder;
3232
import org.eclipse.core.resources.IProject;
3333
import org.eclipse.core.runtime.IPath;
34+
import org.eclipse.core.runtime.IStatus;
35+
import org.eclipse.core.runtime.Status;
3436

3537
import io.sloeber.autoBuild.api.IAutoBuildMakeRule;
38+
import io.sloeber.autoBuild.core.Activator;
3639
import io.sloeber.autoBuild.integration.AutoBuildConfigurationDescription;
3740
import io.sloeber.autoBuild.schema.api.IInputType;
3841
import io.sloeber.autoBuild.schema.api.IOption;
@@ -288,10 +291,16 @@ public String[] getRecipes(IFolder buildFolder, AutoBuildConfigurationDescriptio
288291
break;
289292
}
290293
case ICSettingEntry.INCLUDE_PATH: {
291-
IFolder folder = project.getWorkspace().getRoot()
292-
.getFolder(IPath.forPosix(curEntry.getValue()));
294+
IPath path = project.getWorkspace().getRoot()
295+
.getFolder(IPath.forPosix(curEntry.getValue())).getLocation();
296+
if(path==null) {
297+
//Log error to allow for investigation
298+
Activator.log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, "No location found for "+curEntry.getValue()));
299+
300+
}else {
293301
includePath = includePath + WHITESPACE + DOUBLE_QUOTE + CMD_LINE_INCLUDE_FOLDER
294-
+ folder.getLocation().toString() + DOUBLE_QUOTE;
302+
+ path.toString() + DOUBLE_QUOTE;
303+
}
295304
break;
296305
}
297306
case ICSettingEntry.MACRO: {

0 commit comments

Comments
 (0)