mirror of
https://github.com/hyprwm/hyprlang.git
synced 2024-12-22 09:59:48 +01:00
core: throw custom value errors from handler
This commit is contained in:
parent
bf5c561905
commit
bbf5c30b0c
1 changed files with 7 additions and 1 deletions
|
@ -405,8 +405,14 @@ CParseResult CConfig::configSetValueSafe(const std::string& command, const std::
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CConfigValue::eDataType::CONFIGDATATYPE_CUSTOM: {
|
case CConfigValue::eDataType::CONFIGDATATYPE_CUSTOM: {
|
||||||
reinterpret_cast<CConfigCustomValueType*>(VALUEIT->second.m_pData)->handler(value.c_str(), &reinterpret_cast<CConfigCustomValueType*>(VALUEIT->second.m_pData)->data);
|
auto RESULT = reinterpret_cast<CConfigCustomValueType*>(VALUEIT->second.m_pData)
|
||||||
|
->handler(value.c_str(), &reinterpret_cast<CConfigCustomValueType*>(VALUEIT->second.m_pData)->data);
|
||||||
reinterpret_cast<CConfigCustomValueType*>(VALUEIT->second.m_pData)->lastVal = value;
|
reinterpret_cast<CConfigCustomValueType*>(VALUEIT->second.m_pData)->lastVal = value;
|
||||||
|
|
||||||
|
if (RESULT.error) {
|
||||||
|
result.setError(RESULT.getError());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
|
Loading…
Reference in a new issue