Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cc-cli
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
Container Registry
Model registry
Operate
Environments
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
Mirror
cc-cli
Commits
0b95c2ba
Commit
0b95c2ba
authored
14 years ago
by
Seblu
Browse files
Options
Downloads
Patches
Plain Diff
better handling of bad exceptions
parent
d51fda10
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/cc-cli
+2
-2
2 additions, 2 deletions
bin/cc-cli
cccli/cli.py
+1
-1
1 addition, 1 deletion
cccli/cli.py
with
3 additions
and
3 deletions
bin/cc-cli
+
2
−
2
View file @
0b95c2ba
...
@@ -137,10 +137,10 @@ except BadArgument as e:
...
@@ -137,10 +137,10 @@ except BadArgument as e:
except
KeyboardInterrupt
:
except
KeyboardInterrupt
:
exit
(
1
)
exit
(
1
)
except
cliError
as
e
:
except
cliError
as
e
:
printer
.
error
(
str
(
e
))
printer
.
error
(
"
cliError: %s
"
%
str
(
e
))
except
Exception
as
e
:
except
Exception
as
e
:
if
cccli
.
debug
:
if
cccli
.
debug
:
printer
.
fatal
(
str
(
e
),
quit
=
False
)
printer
.
fatal
(
"
%s: %s
"
%
(
type
(
e
),
str
(
e
)
)
,
quit
=
False
)
raise
raise
printer
.
warn
(
"
This is a not expected error, please report it!
"
)
printer
.
warn
(
"
This is a not expected error, please report it!
"
)
printer
.
fatal
(
str
(
e
))
printer
.
fatal
(
str
(
e
))
This diff is collapsed.
Click to expand it.
cccli/cli.py
+
1
−
1
View file @
0b95c2ba
...
@@ -149,7 +149,7 @@ class Cli(object):
...
@@ -149,7 +149,7 @@ class Cli(object):
except
Exception
as
e
:
except
Exception
as
e
:
if
cccli
.
debug
:
if
cccli
.
debug
:
raise
raise
self
.
printer
.
error
(
str
(
e
))
self
.
printer
.
error
(
"
%s: %s
"
%
(
type
(
e
),
str
(
e
))
)
self
.
printer
.
warn
(
"
This is a not expected error, please report it!
"
)
self
.
printer
.
warn
(
"
This is a not expected error, please report it!
"
)
class
CliHandler
(
RpcHandler
):
class
CliHandler
(
RpcHandler
):
...
...
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