Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
trdm opened this issue Jun 21, 2020 · 7 comments

Comments

@trdm
Copy link

trdm commented Jun 21, 2020

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 ..

@sieukrem
Copy link
Owner

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

@trdm
Copy link
Author

trdm commented Jun 21, 2020

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.

@sieukrem
Copy link
Owner

How can I reproduce the issue?

@trdm
Copy link
Author

trdm commented Jun 22, 2020

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 хранились данные для скриптов.

@sieukrem
Copy link
Owner

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

2020-06-22 11_37_55-Window

@trdm
Copy link
Author

trdm commented Jun 22, 2020

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

@trdm
Copy link
Author

trdm commented Jun 22, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants