diff --git a/hasaki-gen-crud.js b/hasaki-gen-crud.js index 3937438..6c55860 100644 --- a/hasaki-gen-crud.js +++ b/hasaki-gen-crud.js @@ -1,13 +1,20 @@ -const vscode = require("vscode") -const fs = require("fs") -let start = vscode.window.activeTextEditor.document.lineCount -let fileName = vscode.window.activeTextEditor.document.fileName +try { -console.log(start) -console.log(fileName) -var context = fs.readFileSync(fileName) + const vscode = require("vscode") + const fs = require("fs") -var context_arr = context.split("\n") -console.log(context) -console.log(context_arr[start]) \ No newline at end of file + let start = vscode.window.activeTextEditor.document.lineCount + let fileName = vscode.window.activeTextEditor.document.fileName + + console.log(start) + console.log(fileName) + var context = fs.readFileSync(fileName) + + var context_arr = context.split("\n") + console.log(context) + console.log(context_arr[start]) +} catch (error) { + + console.log(error) +} \ No newline at end of file