Skip to content

Better error messaging when source is undefined #979

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

Closed
joshbruce opened this issue Dec 25, 2017 · 2 comments
Closed

Better error messaging when source is undefined #979

joshbruce opened this issue Dec 25, 2017 · 2 comments
Labels
RR - refactor & re-engineer Results in an improvement to developers using Marked, or end-users, or both.

Comments

@joshbruce
Copy link
Member

Perhaps add some error reporting for marked() if src ends up undefined 🤔? That way it's pretty clear the issue is not the marked library...

See #969

@joshbruce joshbruce added the RR - refactor & re-engineer Results in an improvement to developers using Marked, or end-users, or both. label Dec 25, 2017
@Feder1co5oave
Copy link
Contributor

My #682 tried to fix this by silently failing (return null), though I agree with you that a more explicit error message can be more helpful as rightfully pointed out here: #682 (comment).

Maybe something along the lines of
marked(): input parameter is null/undefined or
marked(): input parameter of type <type>, string expected

?

@Feder1co5oave
Copy link
Contributor

Can close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RR - refactor & re-engineer Results in an improvement to developers using Marked, or end-users, or both.
Projects
None yet
Development

No branches or pull requests

2 participants