Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
dynamic-graph
Commits
982ab8f4
Commit
982ab8f4
authored
Feb 25, 2020
by
Joseph Mirabel
Browse files
[TracerRealTime] Fix addSignalToTrace for exception handling
parent
57f773ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/traces/tracer.cpp
View file @
982ab8f4
...
...
@@ -88,11 +88,12 @@ Tracer::Tracer(const std::string n)
void
Tracer
::
addSignalToTrace
(
const
SignalBase
<
int
>
&
sig
,
const
string
&
filename
)
{
dgDEBUGIN
(
15
);
// openFile may throw so it should be called first.
if
(
namesSet
)
openFile
(
sig
,
filename
);
toTraceSignals
.
push_back
(
&
sig
);
dgDEBUGF
(
15
,
"%p"
,
&
sig
);
names
.
push_back
(
filename
);
if
(
namesSet
)
openFile
(
sig
,
filename
);
triger
.
addDependency
(
sig
);
dgDEBUGOUT
(
15
);
}
...
...
tests/debug-real-time-tracer.cpp
View file @
982ab8f4
...
...
@@ -65,11 +65,16 @@ BOOST_AUTO_TEST_CASE(test_tracer) {
std
::
string
basename
(
"my-tracer"
);
std
::
string
suffix
(
".dat"
);
/// Test openfiles
atracer
.
setBufferSize
(
1
<<
14
);
atracer
.
openFiles
(
rootdir
,
basename
,
suffix
);
/// Add trace by name
// Check that an exception is thrown if the filename is invalid.
atracer
.
openFiles
(
rootdir
,
"invalid/filename"
,
suffix
);
BOOST_CHECK_THROW
(
atracer
.
addSignalToTraceByName
(
"my-entity.out_double"
,
"output"
),
ExceptionTraces
);
// Test openfiles
atracer
.
openFiles
(
rootdir
,
basename
,
suffix
);
// Add trace by name
atracer
.
addSignalToTraceByName
(
"my-entity.out_double"
,
"output"
);
/// Add trace by name
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment