sdercolin / vlabeler-textgrid

A set of plugins of vLabeler for Praat TextGrid
7 stars 1 forks source link

Adding more detail error message in mark tier relations while child boundary was not found #2

Closed RibosomeK closed 1 month ago

RibosomeK commented 1 month ago

Before this change, when user encounter Could not find child boundary for parent boundary error, it only show the parent boundary without other information, like the following pitcure shows. before

After this change, file name and entry name are also added in the error message so that users could located the problem more easily. after

To implement this change I change the return value of alignBoundaries into an object with extra values beside the original array. And move the error outside the function. I am not very familar with JavaScript so if there is a more appropriate implementation please let me know and I wound try to improve it.

For testing I only tried messing around with the first and the last boundares, both from child tier and parent tier, it seems working fine and no out of index error is happended.

RibosomeK commented 1 month ago

Thank you! I think this improvement is good! Please also update the plugin version: https://github.com/sdercolin/vlabeler-textgrid/blob/main/plugins/macro/textgrid-mark-tier-relations/plugin.json#L3

I just update the version from 3 to 4. Are there anything need to be done?

sdercolin commented 1 month ago

@RibosomeK Thank you, LGTM