Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
dCache
cta
Commits
d3866475
Commit
d3866475
authored
6 years ago
by
Steven Murray
Browse files
Options
Downloads
Patches
Plain Diff
AcsCmdLine::handleUnknownOption() now throws UnknownOption instead of InvalidAgument
parent
0992d116
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mediachanger/acs/AcsCmdLine.cpp
+1
-2
1 addition, 2 deletions
mediachanger/acs/AcsCmdLine.cpp
mediachanger/acs/AcsCmdLine.hpp
+9
-0
9 additions, 0 deletions
mediachanger/acs/AcsCmdLine.hpp
with
10 additions
and
2 deletions
mediachanger/acs/AcsCmdLine.cpp
+
1
−
2
View file @
d3866475
...
...
@@ -17,7 +17,6 @@
*/
#include
"AcsCmdLine.hpp"
#include
"common/exception/InvalidArgument.hpp"
#include
"common/exception/MissingOperand.hpp"
#include
<stdlib.h>
...
...
@@ -170,7 +169,7 @@ void cta::mediachanger::acs::AcsCmdLine::handleMissingParameter(const int opt) {
// handleUnknownOption
//------------------------------------------------------------------------------
void
cta
::
mediachanger
::
acs
::
AcsCmdLine
::
handleUnknownOption
(
const
int
opt
)
{
cta
::
exception
::
InvalidArgument
ex
;
UnknownOption
ex
;
if
(
0
==
optopt
)
{
ex
.
getMessage
()
<<
"Unknown command-line option"
;
}
else
{
...
...
This diff is collapsed.
Click to expand it.
mediachanger/acs/AcsCmdLine.hpp
+
9
−
0
View file @
d3866475
...
...
@@ -96,10 +96,19 @@ protected:
*/
void
handleMissingParameter
(
const
int
opt
);
/**
* Unkown option.
*/
struct
UnknownOption
:
public
exception
::
Exception
{
UnknownOption
(
const
std
::
string
&
context
=
""
,
const
bool
embedBacktrace
=
true
)
:
cta
::
exception
::
Exception
(
context
,
embedBacktrace
)
{}
};
/**
* Handles the specified unknown option.
*
* @param opt The option.
* @throw UnknownOption indepedent of the value of opt.
*/
void
handleUnknownOption
(
const
int
opt
);
...
...
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