}
static void getSupportedMipVersions(const SelfComponentClass selfCompCls,
- const ConstValue params, const LoggingLevel loggingLevel,
+ const ConstMapValue params, const LoggingLevel loggingLevel,
const UnsignedIntegerRangeSet ranges)
{
UserComponentT::_getSupportedMipVersions(selfCompCls, params, loggingLevel, ranges);
}
/* Overloadable */
- static void _getSupportedMipVersions(SelfComponentClass, ConstValue, LoggingLevel,
+ static void _getSupportedMipVersions(SelfComponentClass, ConstMapValue, LoggingLevel,
const UnsignedIntegerRangeSet ranges)
{
ranges.addRange(0, 0);
}
static void getSupportedMipVersions(const SelfComponentClass selfCompCls,
- const ConstValue params, const LoggingLevel loggingLevel,
+ const ConstMapValue params, const LoggingLevel loggingLevel,
const UnsignedIntegerRangeSet ranges)
{
UserComponentT::_getSupportedMipVersions(selfCompCls, params, loggingLevel, ranges);
}
/* Overloadable */
- static void _getSupportedMipVersions(SelfComponentClass, ConstValue, LoggingLevel,
+ static void _getSupportedMipVersions(SelfComponentClass, ConstMapValue, LoggingLevel,
const UnsignedIntegerRangeSet ranges)
{
ranges.addRange(0, 0);
}
static void getSupportedMipVersions(const SelfComponentClass selfCompCls,
- const ConstValue params, const LoggingLevel loggingLevel,
+ const ConstMapValue params, const LoggingLevel loggingLevel,
const UnsignedIntegerRangeSet ranges)
{
UserComponentT::_getSupportedMipVersions(selfCompCls, params, loggingLevel, ranges);
}
/* Overloadable */
- static void _getSupportedMipVersions(SelfComponentClass, ConstValue, LoggingLevel,
+ static void _getSupportedMipVersions(SelfComponentClass, ConstMapValue, LoggingLevel,
const UnsignedIntegerRangeSet ranges)
{
ranges.addRange(0, 0);
/* Type of `_mExcToThrowType` */
enum class _ExcToThrowType
{
- NONE,
- ERROR,
- MEM_ERROR,
+ None,
+ Error,
+ MemError,
};
protected:
}
public:
- void next(bt2::ConstMessageArray& messages)
+ void next(ConstMessageArray& messages)
{
/* Any saved error? Now is the time to throw */
- if (G_UNLIKELY(_mExcToThrowType != _ExcToThrowType::NONE)) {
+ if (G_UNLIKELY(_mExcToThrowType != _ExcToThrowType::None)) {
/* Move `_mSavedLibError`, if any, as current thread error */
if (_mSavedLibError) {
bt_current_thread_move_error(_mSavedLibError.release());
}
/* Throw the corresponding exception */
- if (_mExcToThrowType == _ExcToThrowType::ERROR) {
- throw bt2::Error {};
+ if (_mExcToThrowType == _ExcToThrowType::Error) {
+ throw Error {};
} else {
- BT_ASSERT(_mExcToThrowType == _ExcToThrowType::MEM_ERROR);
- throw bt2::MemoryError {};
+ BT_ASSERT(_mExcToThrowType == _ExcToThrowType::MemError);
+ throw MemoryError {};
}
}
* if any, so that we can restore it later (see the beginning of
* this method).
*/
- BT_ASSERT_DBG(_mExcToThrowType == _ExcToThrowType::NONE);
+ BT_ASSERT_DBG(_mExcToThrowType == _ExcToThrowType::None);
try {
this->_userObj()._next(messages);
/* We're done: everything below is exception handling */
return;
- } catch (const bt2::TryAgain&) {
+ } catch (const TryAgain&) {
if (messages.isEmpty()) {
throw;
}
throw;
}
- _mExcToThrowType = _ExcToThrowType::MEM_ERROR;
- } catch (const bt2::Error&) {
+ _mExcToThrowType = _ExcToThrowType::MemError;
+ } catch (const Error&) {
if (messages.isEmpty()) {
throw;
}
- _mExcToThrowType = _ExcToThrowType::ERROR;
+ _mExcToThrowType = _ExcToThrowType::Error;
}
- if (_mExcToThrowType != _ExcToThrowType::NONE) {
+ if (_mExcToThrowType != _ExcToThrowType::None) {
BT_CPPLOGE(
"An error occurred, but there are {} messages to return: delaying the error reporting.",
messages.length());
void _resetError() noexcept
{
- _mExcToThrowType = _ExcToThrowType::NONE;
+ _mExcToThrowType = _ExcToThrowType::None;
_mSavedLibError.reset();
}
*
* It also saves the type of the exception to throw the next time.
*/
- _ExcToThrowType _mExcToThrowType = _ExcToThrowType::NONE;
+ _ExcToThrowType _mExcToThrowType = _ExcToThrowType::None;
struct LibErrorDeleter final
{