Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
bdb96b1c
Commit
bdb96b1c
authored
Sep 13, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rescue all exceptions and try to be a bit more helpful when they occur.
parent
d7506754
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
11 deletions
+24
-11
pod
bin/pod
+1
-1
command.rb
lib/cocoa_pods/command.rb
+23
-10
No files found.
bin/pod
View file @
bdb96b1c
...
...
@@ -7,4 +7,4 @@ end
require 'cocoa_pods'
Pod::Command.
parse(*ARGV).run
Pod::Command.
run(*ARGV)
lib/cocoa_pods/command.rb
View file @
bdb96b1c
...
...
@@ -10,13 +10,15 @@ module Pod
@command_class
,
@argv
=
command_class
,
argv
end
def
run
puts
@command_class
.
banner
puts
puts
"Options"
puts
"-------"
puts
puts
@command_class
.
options
def
message
[
@command_class
.
banner
,
''
,
'Options'
,
'-------'
,
''
,
@command_class
.
options
].
join
(
"
\n
"
)
end
end
...
...
@@ -41,6 +43,19 @@ module Pod
" --verbose Print more information while working"
end
def
self
.
run
(
*
argv
)
parse
(
*
argv
).
run
rescue
Exception
=>
e
unless
e
.
is_a?
(
Help
)
puts
"Oh no, an error occurred. Please run with `--verbose' and report "
\
"on https://github.com/alloy/cocoa-pods/issues."
puts
""
end
puts
e
.
message
puts
*
e
.
backtrace
if
Config
.
instance
.
verbose
exit
1
end
def
self
.
parse
(
*
argv
)
argv
=
ARGV
.
new
(
argv
)
show_help
=
argv
.
option
(
'--help'
)
...
...
@@ -54,12 +69,10 @@ module Pod
end
if
show_help
||
command_class
.
nil?
Help
.
new
(
command_class
||
self
,
argv
)
raise
Help
.
new
(
command_class
||
self
,
argv
)
else
command_class
.
new
(
argv
)
end
rescue
Help
=>
help
return
help
end
include
Config
::
Mixin
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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