yql_panic.cpp 487 B

123456789101112131415161718
  1. #include "yql_panic.h"
  2. namespace NYql {
  3. namespace NDetail {
  4. void YqlPanic(const ::NPrivate::TStaticBuf& file, int line, const char* function,
  5. const TStringBuf& condition, const TStringBuf& message) {
  6. auto err = TYqlPanic() << file.As<TStringBuf>() << ":" << line << " "
  7. << function << "(): requirement " << condition << " failed";
  8. if (!message.empty()) {
  9. err << ", message: " << message;
  10. }
  11. throw err;
  12. }
  13. } // namespace NDetail
  14. } // namespace NYql