jn-npp-plugin icon indicating copy to clipboard operation
jn-npp-plugin copied to clipboard

Little information about where the error occurred/Мало информации о месте возникновения ошибки

Open trdm opened this issue 5 years ago • 7 comments

How to determine the place where a script execution error occurred. I’m attaching a screenshot. https://prnt.sc/t3n6uh I use my set of scripts, I am ready to provide it for playback. I will try to catch the place of the error by debugging. However, more information about the localization of the error will not hurt ..

trdm avatar Jun 21 '20 06:06 trdm

I assume you execute your Scripts by calling eval. If des, then use addScript. You will find example in jn/start.js

sieukrem avatar Jun 21 '20 07:06 sieukrem

I assume you execute your Scripts by calling eval. If des, then use addScript. You will find example in jn/start.js

No, I do not use 'eval' in my scripts.

trdm avatar Jun 21 '20 19:06 trdm

How can I reproduce the issue?

sieukrem avatar Jun 21 '20 22:06 sieukrem

Something like this.

var gNjPluginDir = Editor.nppDir + "\\plugins\\jN\\";
var gFSO = new ActiveXObject("Scripting.FileSystemObject");
var gNjPluginDir2 = gNjPluginDir + "Intell\\";

function f1() {
	var vFileName = gNjPluginDir+"Intell\\_progIdDumped.dict";
	// Директории 'Intell' не существует в директории gNjPluginDir
	var vFile = gFso.CreateTextFile(vFileName,false); // << ошибка тут.
}

f1();

In the test script, a slightly different type of error is obtained. Место возникновения: https://github.com/trdm/jn-npp-scripts/blob/8303b88be670d75936fbf26403a9b8c256d6ecb1/includes/intelOle.js#L373

Полагаю связано с переездом скриптов в поддиректорию. у меня в папке jN хранились данные для скриптов.

trdm avatar Jun 22 '20 06:06 trdm

For me is working fine within a file opend in npp and executed via F5

2020-06-22 11_37_55-Window

sieukrem avatar Jun 22 '20 09:06 sieukrem

https://prnt.sc/t48win Maybe because the error occurs in the function of the object? Может из-за того, что ошибка происходит в функции объекта? https://prnt.sc/t48ybi

trdm avatar Jun 22 '20 10:06 trdm

gif with an error. https://github.com/trdm/jn-npp-scripts/blob/master/Help/20200622-14-12.gif

trdm avatar Jun 22 '20 11:06 trdm