MCPcopy Create free account
hub / github.com/catboost/catboost / Check

Function Check

catboost/node-package/src/api_helpers.h:18–24  ·  view source on GitHub ↗

Checks if the condition is true, schedules JS exception otherwise. Returns false if check failed.

Source from the content-addressed store, hash-verified

16// Checks if the condition is true, schedules JS exception otherwise.
17// Returns false if check failed.
18inline bool Check(Napi::Env env, bool condition, const std::string& message) {
19 if (!condition) {
20 Napi::TypeError::New(env, message).ThrowAsJavaScriptException();
21 }
22
23 return condition;
24}
25
26// Checks if the pointer is not null, throws JS exception otherwise.
27template <typename T>

Callers 11

CheckNotNullFunction · 0.70
CheckIsMatrixFunction · 0.70
TModelMethod · 0.70
LoadFullFromFileMethod · 0.70
SetPredictionTypeMethod · 0.70
CalcPredictionMethod · 0.70
EvaluateOnGPUMethod · 0.70
GetEmbeddingFeaturesDataFunction · 0.70
CheckMethod · 0.50

Calls 1

NewFunction · 0.50

Tested by

no test coverage detected