You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have been 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 (
), I can see that all errors are caught on the mermaid level and never propagated to the clients. That is a problem described in several issues. One is here (mermaid-js/mermaid-cli#138)
Describe the solution you'd like
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()
Describe alternatives you've considered
Remove try-catch in the current implementation of init()
Reimplement parts of the init() in mermaid-cli
Is your feature request related to a problem? Please describe.
I have been 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
Describe the solution you'd like
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()
Describe alternatives you've considered
Remove try-catch in the current implementation of init()
Reimplement parts of the init() in mermaid-cli
Additional context
Discussion in slack: https://mermaid-talk.slack.com/archives/CL256P19N/p1633101057039000
The text was updated successfully, but these errors were encountered: