| 366 | } |
| 367 | |
| 368 | void ViewingRules::setCustomKey(size_t ruleIndex, const char * key, const char * value) |
| 369 | { |
| 370 | m_impl->validatePosition(ruleIndex); |
| 371 | try |
| 372 | { |
| 373 | m_impl->m_rules[ruleIndex]->m_customKeys.set(key, value); |
| 374 | } |
| 375 | catch (Exception & e) |
| 376 | { |
| 377 | std::ostringstream oss; |
| 378 | oss << "Viewing rules: rule named '" << std::string(m_impl->m_rules[ruleIndex]->getName()) |
| 379 | << "' error: " << e.what(); |
| 380 | throw Exception(oss.str().c_str()); |
| 381 | } |
| 382 | } |
| 383 | |
| 384 | void ViewingRules::insertRule(size_t ruleIndex, const char * name) |
| 385 | { |
nothing calls this directly
no test coverage detected