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

Improve NotImplementedError message #5948

Closed

Conversation

RX14
Copy link
Contributor

@RX14 RX14 commented Apr 14, 2018

Show the platform the feature is not implemented on when raising NotImplementedError.

@jhass
Copy link
Member

jhass commented Apr 14, 2018

I'm not sure I agree that the only reason to raise this is platform specifics. Keep in mind not only the stdlib but any project may want to use it.

How about a more specific exception type or another constructor?

new(item, current_os)
end

private def self.current_os
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this make sense as a public constant Crystal::PLATFORM?

@RX14
Copy link
Contributor Author

RX14 commented Apr 15, 2018

Looking back, I can't remember why I made this commit either (look at the date on the commit)...

If I remember, I'll reopen.

@RX14 RX14 closed this Apr 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants