Hi folks,

right now many of plugins send error messages without prefixing the plugin
they come from, this bad practice is also continued in our examples.

many error messages also close with `\n`, although this is not necessary.

We should fix this by "normalizing" the way we send those error messages.

My proposal is either:

    TSError("%s: cannot parse file %s", PLUGIN_NAME, filename);

xor:

    TSError("[%s] cannot parse file %s", PLUGIN_NAME, filename);

I have no strong leanings towards either. BUT: We should have one consistent
format between examples and plugins, as well as newly imported code.

The word "error" should not be repeated, as it is already in the "severity
(`TSError()`). There should be *no* `\n` at the end of the message.

Normally I would just grep the source and see which use-case is the
prevailing one, but I'm too tired and I'm flying to Ireland tomorrow,
so I'm leaving this as "an exercise to the student" ;)

reference issue: https://issues.apache.org/jira/browse/TS-2106

that's all folks,

-- i
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.ga...@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE

Reply via email to