MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / checkFileError

Function checkFileError

src/jrd/trace/TraceConfigStorage.cpp:69–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67static const FB_UINT64 TOUCH_INTERVAL = 60 * 60; // in seconds, one hour should be enough
68
69void checkFileError(const char* filename, const char* operation, ISC_STATUS iscError)
70{
71 if (errno == 0)
72 return;
73
74#ifdef WIN_NT
75 // we can't use SYS_ERR(errno) on Windows as errno codes is not
76 // the same as GetLastError() codes
77 const char* strErr = strerror(errno);
78
79 (Arg::Gds(isc_io_error) << Arg::Str(operation) << Arg::Str(filename) <<
80 Arg::Gds(iscError) << Arg::Str(strErr)).raise();
81#else
82 (Arg::Gds(isc_io_error) << Arg::Str(operation) << Arg::Str(filename) <<
83 Arg::Gds(iscError) << SYS_ERR(errno)).raise();
84#endif
85}
86
87ConfigStorage::ConfigStorage()
88 : m_timer(FB_NEW TouchFile),

Callers 1

checkAuditMethod · 0.85

Calls 3

GdsClass · 0.85
StrClass · 0.85
raiseMethod · 0.45

Tested by

no test coverage detected