MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / error

Method error

examples/TinyAudio/RtAudio.cpp:10506–10537  ·  view source on GitHub ↗

This method can be modified to control the behavior of error message printing.

Source from the content-addressed store, hash-verified

10504// This method can be modified to control the behavior of error
10505// message printing.
10506void RtApi ::error(RtAudioError::Type type)
10507{
10508 errorStream_.str(""); // clear the ostringstream
10509
10510 RtAudioErrorCallback errorCallback = (RtAudioErrorCallback)stream_.callbackInfo.errorCallback;
10511 if (errorCallback)
10512 {
10513 // abortStream() can generate new error messages. Ignore them. Just keep original one.
10514
10515 if (firstErrorOccurred_)
10516 return;
10517
10518 firstErrorOccurred_ = true;
10519 const std::string errorMessage = errorText_;
10520
10521 if (type != RtAudioError::WARNING && stream_.state != STREAM_STOPPED)
10522 {
10523 stream_.callbackInfo.isRunning = false; // exit from the thread
10524 abortStream();
10525 }
10526
10527 errorCallback(type, errorMessage);
10528 firstErrorOccurred_ = false;
10529 return;
10530 }
10531
10532 if (type == RtAudioError::WARNING && showWarnings_ == true)
10533 std::cerr << '\n'
10534 << errorText_ << "\n\n";
10535 else if (type != RtAudioError::WARNING)
10536 throw(RtAudioError(errorText_, type));
10537}
10538
10539void RtApi ::verifyStream()
10540{

Callers 15

Vec2Function · 0.45
gridFunction · 0.45
makeGridFunction · 0.45
PathFunction · 0.45
diagramToSVGFunction · 0.45
yFunction · 0.45
tFunction · 0.45
vFunction · 0.45
wFunction · 0.45
MFunction · 0.45
yFunction · 0.45
tFunction · 0.45

Calls 2

RtAudioErrorClass · 0.85
strMethod · 0.80

Tested by

no test coverage detected