mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 06:32:10 +02:00
bug 416786: added message in log to indicate invalid option type used in .cproject
This commit is contained in:
parent
67aac2386d
commit
b61d716173
2 changed files with 29 additions and 21 deletions
|
@ -44,6 +44,8 @@ import org.eclipse.cdt.managedbuilder.internal.macros.OptionContextData;
|
|||
import org.eclipse.cdt.managedbuilder.macros.IOptionContextData;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.osgi.framework.Version;
|
||||
|
||||
public class Option extends BuildObject implements IOption, IBuildPropertiesRestriction {
|
||||
|
@ -776,7 +778,9 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
} else if (valueTypeStr.equals(TYPE_TREE)) {
|
||||
return TREE;
|
||||
} else {
|
||||
// TODO: This was the CDT 2.0 default - should we keep it?
|
||||
ManagedBuilderCorePlugin.log(new Status(IStatus.ERROR, ManagedBuilderCorePlugin.PLUGIN_ID,
|
||||
"Invalid option type=\"" + valueTypeStr + "\" specified for option " + getId() )); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
// This was the CDT 2.0 default
|
||||
return PREPROCESSOR_SYMBOLS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -233,6 +233,7 @@ public class BuildEntryStorage extends AbstractEntryStorage {
|
|||
List<UserEntryInfo> entryList = new ArrayList<UserEntryInfo>();
|
||||
for (IOption opt : options) {
|
||||
Option option = (Option)opt;
|
||||
try {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<OptionStringValue> list = usr ? (List<OptionStringValue>)option.getExactValue() : (List<OptionStringValue>)option.getExactBuiltinsList();
|
||||
if (list != null) {
|
||||
|
@ -257,6 +258,9 @@ public class BuildEntryStorage extends AbstractEntryStorage {
|
|||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ManagedBuilderCorePlugin.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
return entryList.toArray(new UserEntryInfo[entryList.size()]);
|
||||
|
|
Loading…
Add table
Reference in a new issue