Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raise informative error message when user supplied invalid platform #403

Merged
merged 1 commit into from Jul 15, 2012

Conversation

siuying
Copy link
Contributor

@siuying siuying commented Jul 15, 2012

A small patch to add informative error message for error like issue #401.

For following Podfile:

platform :iOS

pod 'CoconutKit'

Instead of crash on ``pod install` it now throw:

> pod install
[!] Unsupported platform: Platform must be one of [:ios, :osx]

@travisbot
Copy link

This pull request fails (merged 695509f into ea64987).

@alloy
Copy link
Member

alloy commented Jul 15, 2012

Great! Please merge.

I’m thinking that maybe we could have a Podfile::Informative error class (which inherits from Informative) and override its #message method to get the Podfile line number that the error occurred on from the backtrace and include that in the message. E.g.

> pod install
[!] Unsupported platform. Must be one of `:ios' or `:osx'. (./Podfile line #3)

What do you think?

siuying added a commit that referenced this pull request Jul 15, 2012
raise informative error message when user supplied invalid platform
@siuying siuying merged commit cae31b0 into CocoaPods:master Jul 15, 2012
@siuying
Copy link
Contributor Author

siuying commented Jul 15, 2012

@alloy that would be helpful. Let me see if I can add it!

@alloy
Copy link
Member

alloy commented Jul 16, 2012

@siuying Will you be adding the suggested addition too? If not tonight, then I will release a bug fix version now.

@siuying
Copy link
Contributor Author

siuying commented Jul 17, 2012

Opps was blocked by something else, now added in #408.

jzapater pushed a commit to jzapater/CocoaPods that referenced this pull request Sep 17, 2013
Add spec MDCScrollBarLabel 0.0.1.
siuying added a commit that referenced this pull request Oct 25, 2014
raise informative error message when user supplied invalid platform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants