mirror of
https://github.com/hyprwm/hyprlang.git
synced 2024-11-16 18:25:57 +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;
|
||||
}
|
||||
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;
|
||||
|
||||
if (RESULT.error) {
|
||||
result.setError(RESULT.getError());
|
||||
return result;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
|
Loading…
Reference in a new issue