Is there any way to manually make CH throw a specific error?

Something like this:
```sql
SELECT throwError(999);

Received exception from server (version 22.2.2):
Code: 999. DB::Exception: KEEPER_EXCEPTION ...
```

PS:
*Although there is a similar function (`throwIf`), it only returns code=395 (FUNCTION_THROW_IF_VALUE_IS_NON_ZERO).*

**Use case**

We're looking something like this so we can simulate errors and take relevant actions agains some errors.

{
        using ResultDataType = TransformResultDataType<FromDataType>;
        if constexpr (std::is_same_v<ResultDataType, DataTypeDate>)
            return std::make_shared<DataTypeDate>();
        else if constexpr (std::is_same_v<ResultDataType, DataTypeDate32>)
            return std::make_shared<DataTypeDate32>();
        else if constexpr (std::is_same_v<ResultDataType, DataTypeDateTime>)
        {
            return std::make_shared<DataTypeDateTime>(extractTimeZoneNameFromFunctionArguments(arguments, 2, 0));
        }
        else if constexpr (std::is_same_v<ResultDataType, DataTypeDateTime64>)
        {
            if (typeid_cast<const DataTypeDateTime64 *>(arguments[0].type.get()))
            {
                const auto & datetime64_type = assert_cast<const DataTypeDateTime64 &>(*arguments[0].type);
                auto from_scale = datetime64_type.getScale();
                auto scale = from_scale;
                if (std::is_same_v<Transform, AddNanosecondsImpl>)
                    scale = 9;