-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Add initThrowsErrors() #2379
Add initThrowsErrors() #2379
Conversation
Hey Is this PR still a draft? Regards, |
@ashishjain0512 : yes, I want to add few tests. Thanks for asking! Would you be willing to have a look at the idea and provide early feedback? |
I have received a confirmation of the validity of the idea from @knsv in slack thread https://mermaid-talk.slack.com/archives/CL256P19N/p1633101057039000 Now if someone can review the implementation of the idea? 😉 |
Looks like this was approved, any further changes required here? :-) |
Please, let me know if the PR can be somehow improved, so that it can be merged. |
The newest issue related to my PR in mermaid-cli project: mermaid-js/mermaid-cli#276 |
Missing piece for mermaid-js#2379
📑 Summary
looking into several issues related to propagating the syntax errors from mermaid to other clients, e.g. mermaid-cli. By inspecting the code of mermaid.js (
mermaid/src/mermaid.js
Line 122 in d040883
Resolves #2378
📏 Design Decisions
Make another function called init(), rename existing one to initThrowsErrors(). The new init() calls initThrowsErrors() and try-catch lives in init(). Then clients can choose either to call init() or initThrowsErrors()
📋 Tasks
Make sure you
develop
branch