Grammalecte  Check-in [b0501d600a]

Overview
Comment:[core] show rule id and line id when errors
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | core
Files: files | file ages | folders
SHA3-256: b0501d600ae67bc753dbdce6e2a8d131d1c142f15cf42d822244e8197ed484ff
User & Date: olr on 2017-05-25 09:17:18
Other Links: manifest | tags
Context
2017-05-25
09:21
[fr] correction bug avec «ben voyons» check-in: 794aaa7563 user: olr tags: trunk, fr
09:17
[core] show rule id and line id when errors check-in: b0501d600a user: olr tags: trunk, core
09:13
[fr] code de positionnement des groupes check-in: 0093cdc7a4 user: olr tags: trunk, fr
Changes

Modified gc_core/js/lang_core/gc_engine.js from [b4d754f9e9] to [908b008d84].

165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
                                    if (cActionType == ">") {
                                        break;
                                    }
                                }
                            }
                            catch (e) {
                                echo(s);
                                echo("# id-rule:" + sLineId);
                                helpers.logerror(e);
                            }
                        }
                    }
                }
            }
        }







|







165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
                                    if (cActionType == ">") {
                                        break;
                                    }
                                }
                            }
                            catch (e) {
                                echo(s);
                                echo("# line id: " + sLineId + "\n# rule id: " + sRuleId);
                                helpers.logerror(e);
                            }
                        }
                    }
                }
            }
        }

Modified gc_core/py/lang_core/gc_engine.py from [e65591d48d] to [dfad6de958].

122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
                                        # we do nothing, this test is just a condition to apply all following actions
                                        pass
                                    else:
                                        echo("# error: unknown action at " + sLineId)
                                elif cActionType == ">":
                                    break
                            except Exception as e:
                                raise Exception(str(e), sLineId)
    if bChange:
        return (s, dErrs)
    return (False, dErrs)


def _createWriterError (s, sx, sRepl, nOffset, m, iGroup, sLineId, sRuleId, bUppercase, sMsg, sURL, bIdRule, sOption, bContext):
    "error for Writer (LO/OO)"







|







122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
                                        # we do nothing, this test is just a condition to apply all following actions
                                        pass
                                    else:
                                        echo("# error: unknown action at " + sLineId)
                                elif cActionType == ">":
                                    break
                            except Exception as e:
                                raise Exception(str(e), "# " + sLineId + " # " + sRuleId)
    if bChange:
        return (s, dErrs)
    return (False, dErrs)


def _createWriterError (s, sx, sRepl, nOffset, m, iGroup, sLineId, sRuleId, bUppercase, sMsg, sURL, bIdRule, sOption, bContext):
    "error for Writer (LO/OO)"