Skip to content

Commit

Permalink
version add
Browse files Browse the repository at this point in the history
エラー時にバージョンを表示させるようにしました。
多分これが一番コードに変更がない?
  • Loading branch information
misogihagi authored Jan 12, 2020
1 parent 794b2ff commit 54cc7d4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/nako_syntax_error.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/**
* なでしこの文法エラーを表示するクラス
*/
const PluginSystem = require('./plugin_system')

class NakoSyntaxError extends Error {
constructor (msg, line, fname) {
const line2 = line + 1
const fname2 = (fname === undefined) ? '' : fname
const title = `[文法エラー]${fname}(${line2}行目): ${msg}`
const dummy = {__v0: {}}
PluginSystem['!PluginSystem:初期化'].fn(dummy)
const title = `[文法エラー]${fname}(${line2}行目): ${msg}\n[version]: ${dummy.__v0.ナデシコバージョン}`
super(title)

}
}

Expand Down

0 comments on commit 54cc7d4

Please sign in to comment.