Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Pawian
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PWA
Pawian
Commits
0b28247d
Commit
0b28247d
authored
11 years ago
by
Bertram Kopf
Browse files
Options
Downloads
Patches
Plain Diff
added meaningful error log message in KMatrixParser
parent
5539652b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ConfigParser/KMatrixParser.cc
+5
-7
5 additions, 7 deletions
ConfigParser/KMatrixParser.cc
with
5 additions
and
7 deletions
ConfigParser/KMatrixParser.cc
+
5
−
7
View file @
0b28247d
...
...
@@ -47,8 +47,6 @@ KMatrixParser::KMatrixParser(std::string& path)
{
_config
->
add_options
()
(
"configFile"
,
po
::
value
<
std
::
string
>
(
&
_configFile
),
"The name of the configuration file holding further configuration options"
)
(
"keyName"
,
po
::
value
<
std
::
string
>
(
&
_keyName
),
"name for this specific k-matrix"
)
(
"noOfChannels"
,
po
::
value
<
unsigned
int
>
(
&
_noOfChannels
),
"number of channels"
)
(
"noOfPoles"
,
po
::
value
<
unsigned
int
>
(
&
_noOfPoles
),
"number of poles"
)
...
...
@@ -75,18 +73,18 @@ KMatrixParser::KMatrixParser(std::string& path)
bool
KMatrixParser
::
parseCommandLine
()
{
po
::
options_description
config_file_options
;
config_file_options
.
add
(
*
_config
);
std
::
ifstream
ifs
(
_configFile
.
c_str
());
if
(
!
ifs
.
good
())
{
stringstream
strError
;
strError
<<
"Error accessing configuratiocommonn file "
<<
_configFile
;
std
::
cout
<<
config_file_options
<<
endl
;
exit
(
0
);
std
::
cout
<<
"Error accessing configuration file "
<<
_configFile
<<
std
::
endl
;
exit
(
0
);
}
po
::
options_description
config_file_options
;
config_file_options
.
add
(
*
_config
);
po
::
variables_map
vm
;
store
(
po
::
parse_config_file
(
ifs
,
config_file_options
),
vm
);
po
::
notify
(
vm
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment