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

Behaviour when server not available #12

Open
joto opened this issue Feb 23, 2022 · 1 comment
Open

Behaviour when server not available #12

joto opened this issue Feb 23, 2022 · 1 comment

Comments

@joto
Copy link
Contributor

joto commented Feb 23, 2022

It is unclear what the behaviour of the Lua code should be when the server is not available either when first connecting or when the connection fails at some point. In some contexts it might make sense to keep going and not transliterating names (for instance when this is for temporary map views only, when it is more important to show something rather than an error or so), in other cases it might make more sense to stop processing with an error or wait and retry.

To solve this properly I think we need to expose this to the "user code". So instead of magically connecting to the server when the library is loaded add an explicit init or connect call or something. If that fails the user code can then decide what to do. Similarly there should be a defined error return from the libary calls, probably using the standard Lua pcall mechanism.

@giggls
Copy link
Owner

giggls commented Feb 23, 2022

I think we should probably add a lua connection function. If this one is called we can set a transcript-connection=true variable and all daemon communication errors are real errors afterwards. If it is not called we simply return the non-latin input string.

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

No branches or pull requests

2 participants