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
57f773ff
Commit
57f773ff
authored
Feb 25, 2020
by
Joseph Mirabel
Browse files
[TracerRealTime] Check that output file is valid.
parent
e34bd06d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/traces/tracer-real-time.cpp
View file @
57f773ff
...
...
@@ -125,6 +125,11 @@ void TracerRealTime::openFile(const SignalBase<int> &sig,
string
filename
=
rootdir
+
basename
+
signame
+
suffix
;
dgDEBUG
(
5
)
<<
"Sig <"
<<
sig
.
getName
()
<<
">: new file "
<<
filename
<<
endl
;
std
::
ofstream
*
newfile
=
new
std
::
ofstream
(
filename
.
c_str
());
if
(
!
newfile
->
good
())
{
delete
newfile
;
DG_THROW
ExceptionTraces
(
ExceptionTraces
::
NOT_OPEN
,
"Could not open file "
+
filename
+
" for signal "
+
signame
,
""
);
}
dgDEBUG
(
5
)
<<
"Newfile:"
<<
(
void
*
)
newfile
<<
endl
;
hardFiles
.
push_back
(
newfile
);
dgDEBUG
(
5
)
<<
"Creating Outstringstream"
<<
endl
;
...
...
@@ -264,7 +269,7 @@ void TracerRealTime::recordSignal(std::ostream &os,
<<
"> "
<<
endl
;
}
catch
(
ExceptionAbstract
&
exc
)
{
throw
exc
;
throw
;
}
catch
(...)
{
DG_THROW
ExceptionTraces
(
ExceptionTraces
::
NOT_OPEN
,
"The buffer is not open"
,
""
);
...
...
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