Notice that we can't throw a JS exception unless throwing a C++ exception, catching that in a different class. Notice that a JS error might not necessarily express the right connotation, because the error is not on the JS side (not the `PushGUIPage` call).
If one wants greater error support than that, it should probably become a validation error, because the error is in the XML file.
For completeness, notice that most of the SetSetting calls come from IGUIObject code and not from the XML loading code, i.e. it is a C++ code error if calling SetSetting for a setting that does not exist, but it is an XML author (user) error for SetSettingFromString. (That is excluding the few FromString occurrences that seem like calls that should use SetSetting instead, but thats offtopic.)