Allow input mode code to provide custom error messages
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
@@ -79,9 +79,9 @@ input[type="text"] {
|
||||
objectLang.ports.parsedString.subscribe(({ string, term }) => {
|
||||
if (term !== null) {
|
||||
const query = `type(empty, ${term}, ?tau)`;
|
||||
app.ports.receiveConverted.send({ input: string, query });
|
||||
app.ports.receiveConverted.send({ input: string, result: { query } });
|
||||
} else {
|
||||
app.ports.receiveConverted.send({ input: string, query: null });
|
||||
app.ports.receiveConverted.send({ input: string, result: { error: "Unable to parse object language term" } });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user