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

Refactor Server class to handle error while converting #115

Merged
merged 3 commits into from
Jun 28, 2019
Merged

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Jun 28, 2019

I've refactored Server class by extending (Typed)EventEmitter to improve error handling while converting Markdown.

  • A constructor option onConverted is replaced to convert event provided by EventEmitter.
  • When raising an error while converting Markdown...
    • Returns 503 error with raised error message.
    • Emits error event with error instance. Marp CLI uses this to output error message to console.

@yhatt yhatt merged commit fd945d6 into master Jun 28, 2019
@yhatt yhatt deleted the refactor-server branch June 28, 2019 17:30
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.

1 participant