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.

day >= 1 && day <= 31 &&
                YearMonthDayToSingleInt(year, month, day) <= Traits::MAX_DATE)
            {
                day_num = date_lut.makeDayNum(year, month, day);
            }
            result_data[i] = day_num;
        }
        return res_column;
    }
};
struct MakeDateTraits
{
    static constexpr auto name = "makeDate";
    using ReturnDataType = DataTypeDate;
    using ReturnColumnType = ColumnUInt16;
    static constexpr auto MIN_YEAR = 1970;
    static constexpr auto MAX_YEAR = 2149;
    
    static constexpr auto MAX_DATE = YearMonthDayToSingleInt(MAX_YEAR, 6, 6);
};
struct MakeDate32Traits
{
    static constexpr auto name = "makeDate32";
    using ReturnDataType = DataTypeDate32;
    using ReturnColumnType = ColumnInt32;
    static constexpr auto MIN_YEAR = 1900;
    static constexpr auto MAX_YEAR = 2299;
    static constexpr auto MAX_DATE = YearMonthDayToSingleInt(MAX_YEAR, 12, 31);
};
class FunctionMakeDateTimeBase : public FunctionWithNumericParamsBase