aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/assert/assert.cpp
blob: 0c393c2511f0ab25d855820b06cc12a843da63cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "assert.h" 
 
#include <util/system/yassert.h> 
#include <util/system/compiler.h> 
 
namespace NYT::NDetail { 
 
//////////////////////////////////////////////////////////////////////////////// 
 
Y_WEAK void AssertTrapImpl( 
    TStringBuf trapType, 
    TStringBuf expr, 
    TStringBuf file, 
    int line, 
    TStringBuf function) 
{ 
    // Map to Arcadia assert, poorly... 
    ::NPrivate::Panic( 
        ::NPrivate::TStaticBuf(file.data(), file.length()), 
        line, 
        function.data(), 
        expr.data(), 
        "%s", 
        trapType.data()); 
} 
 
//////////////////////////////////////////////////////////////////////////////// 
 
} // namespace NYT::NDetail