FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
uTensor/src/uTensor/errorHandlers/SimpleErrorHandler.cpp at develop · uTensor/uTensor · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
uTensor
/
uTensor
Public
Notifications
You must be signed in to change notification settings
Fork
250
Star
1.9k
Code
Issues
51
Pull requests
5
Discussions
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
uTensor
/
src
/
uTensor
/
errorHandlers
/
SimpleErrorHandler.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
29 lines (24 loc) · 711 Bytes
Breadcrumbs
uTensor
/
src
/
uTensor
/
errorHandlers
/
SimpleErrorHandler.cpp
Copy path
File metadata and controls
29 lines (24 loc) · 711 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
"
SimpleErrorHandler.hpp
"
namespace
uTensor
{
SimpleErrorHandler::SimpleErrorHandler
(
size_t
max_num_events)
: max_num_events(max_num_events) {}
void
SimpleErrorHandler::uThrow
(Error* err) {
if
(_onError)
return
_onError
(err);
else
{
while
(
true
) {
}
}
}
void
SimpleErrorHandler::notify
(
const
Event& evt) {
if
(_eventQ.
size
() >= max_num_events) {
_eventQ.
pop_front
();
}
_eventQ.
push_back
(evt);
}
void
SimpleErrorHandler::set_onError
(onErrorF_t onError) { _onError = onError; }
std::deque<Event>::iterator
SimpleErrorHandler::begin
() {
return
_eventQ.
begin
();
}
std::deque<Event>::iterator
SimpleErrorHandler::end
() {
return
_eventQ.
end
(); }
}
//
namespace uTensor
Back
|
FazBrowse Home
|
New Git URL