Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
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
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
David Youssefi
otb
Commits
5433e513
Commit
5433e513
authored
13 years ago
by
Cyrille Valladeau
Browse files
Options
Downloads
Patches
Plain Diff
ENH: change error message in commandline
parent
cc44c180
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
Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
+8
-8
8 additions, 8 deletions
Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
with
8 additions
and
8 deletions
Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
+
8
−
8
View file @
5433e513
...
...
@@ -217,7 +217,7 @@ CommandLineLauncher::BeforeExecute()
val
=
m_Parser
->
GetAttribut
(
"--progress"
,
m_Expression
);
if
(
val
.
size
()
!=
1
)
{
std
::
cerr
<<
"Invalid progress argument, must be unique value..."
<<
std
::
endl
;
std
::
cerr
<<
"
ERROR:
Invalid progress argument, must be unique value..."
<<
std
::
endl
;
return
false
;
}
if
(
val
[
0
]
==
"1"
||
val
[
0
]
==
"true"
)
...
...
@@ -230,7 +230,7 @@ CommandLineLauncher::BeforeExecute()
}
else
{
std
::
cerr
<<
"Invalid progress argument, must be 0, 1, false or true..."
<<
std
::
endl
;
std
::
cerr
<<
"
ERROR:
Invalid progress argument, must be 0, 1, false or true..."
<<
std
::
endl
;
// Force to reload the application, the LoadParameters can change wrong values
this
->
LoadApplication
();
this
->
DisplayHelp
();
...
...
@@ -333,7 +333,7 @@ CommandLineLauncher::LoadParameters()
// If key doesn't exist and parameter hasn't default value set...
if
(
!
hasValue
)
{
std
::
c
out
<<
"MISSINGMANDATORYPARAMETER
: "
<<
paramKey
<<
" "
<<
m_Application
->
HasValue
(
paramKey
)
<<
std
::
endl
;
std
::
c
err
<<
"ERROR: Missing mandatory parameter
: "
<<
paramKey
<<
" "
<<
m_Application
->
HasValue
(
paramKey
)
<<
std
::
endl
;
return
MISSINGMANDATORYPARAMETER
;
}
}
...
...
@@ -343,7 +343,7 @@ CommandLineLauncher::LoadParameters()
values
=
m_Parser
->
GetAttribut
(
std
::
string
(
"--"
).
append
(
paramKey
),
m_Expression
);
if
(
values
.
size
()
==
0
&&
!
m_Application
->
HasValue
(
paramKey
)
)
{
std
::
c
out
<<
"MISSINGPARAMETERVALUE
: "
<<
paramKey
<<
std
::
endl
;
std
::
c
err
<<
"ERROR: Missing mandatory parameter
: "
<<
paramKey
<<
std
::
endl
;
return
MISSINGPARAMETERVALUE
;
}
}
...
...
@@ -356,7 +356,7 @@ CommandLineLauncher::LoadParameters()
values
=
m_Parser
->
GetAttribut
(
std
::
string
(
"--"
).
append
(
paramKey
),
m_Expression
);
if
(
values
.
size
()
==
0
)
{
std
::
c
out
<<
"MISSINGPARAMETERVALUE
: "
<<
paramKey
<<
std
::
endl
;
std
::
c
err
<<
"ERROR: Missing mandatory parameter
: "
<<
paramKey
<<
std
::
endl
;
return
MISSINGPARAMETERVALUE
;
}
}
...
...
@@ -421,7 +421,7 @@ CommandLineLauncher::LoadParameters()
else
if
(
values
.
size
()
!=
1
&&
values
.
size
()
!=
2
)
{
std
::
c
out
<<
"
INVALIDNUMBEROFVALUE2: "
<<
paramKey
<<
"
"
<<
values
.
size
()
<<
std
::
endl
;
std
::
c
err
<<
"
ERROR: Invalid number of value: "
<<
paramKey
<<
" ,invalid number of values
"
<<
values
.
size
()
<<
std
::
endl
;
return
INVALIDNUMBEROFVALUE
;
}
}
...
...
@@ -433,7 +433,7 @@ CommandLineLauncher::LoadParameters()
else
if
(
values
.
size
()
!=
1
)
{
std
::
c
out
<<
"
INVALIDNUMBEROFVALUE: "
<<
paramKey
<<
"
"
<<
values
.
size
()
<<
std
::
endl
;
std
::
c
err
<<
"
ERROR: Invalid number of value:"
<<
paramKey
<<
", must have 1 value, not
"
<<
values
.
size
()
<<
std
::
endl
;
return
INVALIDNUMBEROFVALUE
;
}
...
...
@@ -459,7 +459,7 @@ CommandLineLauncher::LoadParameters()
}
else
{
std
::
c
out
<<
"
WRONGPARAMETERVALUE
: "
<<
paramKey
<<
std
::
endl
;
std
::
c
err
<<
"
ERROR: Wrong parameter value
: "
<<
paramKey
<<
std
::
endl
;
return
WRONGPARAMETERVALUE
;
}
}
...
...
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