Commit 36ba84f7 authored by Noric Couderc's avatar Noric Couderc
Browse files

Improved error reporting when dropping features

Prints a more helpful error message, saying what features have been
parent 0ad3ab91
......@@ -204,8 +204,11 @@ class FeatureSet(vararg features : Feature) : ArrayList<Feature>() {
* Returns a subset of features which should be supported by the current machine!
fun checked() : FeatureSet {
val featuresChecked = this.filter { it.isSupported() }
return FeatureSet(*featuresChecked.toTypedArray())
val featuresChecked = this.partition { it.isSupported() }
System.err.println("[WARNING]: Some features have been dropped, they are not supported on this machine: ${featuresChecked.second}")
return FeatureSet(*featuresChecked.first.toTypedArray())
fun accept(visitor : FeatureVisitor) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment