Documentation for RunWait() lacks description of returned error codes.
What do the different error code values mean?
It is because these codes appear as a result of the programs you run with RunWait, not to this AutoIT function.
Generic success code is zero, and any non-zero value could mean absolutely anything, and the only way to know what happened is to study this exact app or console command output.
Related
Is there a way for jq to give a reference to where in code an error occurred?
Too often I end up with errors that are unhelpful. Here is an example:
jq: error (at <stdin>:43913): Cannot index object with null
With or without the --slurp flag, the line indicator for stdin is almost always the last line of input. What would be really helpful is to note where in the code it failed at runtime.
Wrapping code snippets in try/catch blocks with $__loc__ have proven unhelpful too, as the line in the code tends to be the catch block, not where the error occurred.
jq: error (at <stdin>:43913) (not a string): {"file":"<top-level>","line":68}
Is there some method to make debugging jq scripts easier?
What I've been doing instead is commenting out large chunks of code and performing a binary search for what code gets the error. It feels like there is a better way.
Sometimes, using gojq ("the Go implementation of jq") gives good insights about errors.
Otherwise, you will probably find that some combination of debug statements, $__loc__, and debugging functions defined using debug to be most helpful.
Consider, for example:
def debug(msg): (msg|debug) as $debug | . ;
(The subtlety here is that you can use "\(.)" in msg.)
In a pinch, the command-line option --debug-trace can be useful.
I remember seeing somewhere that you can specify which dll to get the address of symbols so that one can use that variable in the watch window. I can't for the life of me remember where I saw this. The best that I can come up with is Format Specifiers in C++.
The reason I want this is so that I can see the visibility status of a window and MSVS keeps saying that identifier "IsWindowVisible" is undefined.
I was trying to use something like the following in the watch window:
::IsWindowVisible(m_hWnd),user32.dll
Using:
this->IsWindowVisible()
results in Function CWnd::IsWindowVisible has no address, possibly due to compiler optimizations. which is why I'm trying to use the win32 call. Ideas?
http://msdn.microsoft.com/en-nz/library/y2t7ahxk.aspx
Haven't tried it, but it seems to me that IsWindowVisible(m_hWnd) should work, or maybe IsWindowVisible(this->m_hWnd).
CreateFile for example. When I get INVALID_HANDLE_VALUE, what are all the possible values that can be returned by GetLastError? MSDN doesn't say. It mentions some and I can guess others, but how (if at all) can I be sure that my switch statement will never reach default?
Such a list doesn't exist and in fact you can't ever have such a list. In some future version of Windows a function may well start returning an error code that did not exist when you compiled your program.
The standard way to deal with this is handle any error codes that you know about that need special treatment, and let all others fall through to a default handler. Call FormatMessage() to get a descriptive text string for the error.
In the PSDK reference for ILCreateFromPath there is no information how the function behaves when it fails (and, more importantly, how to get extended error information).
What behavior should I expect, and how can I get that error information?
It is not documented anywhere else. If it fails, it returns a NULL pointer, and there is no extended error info available what that happens.
Use SHParseDisplayName() instead (even Microsoft says it is preferred over ILCreateFromPath()). It returns an HRESULT, which contains an error code on failure.
I am running some VHDL through ModelSim. Each error and warning has its own error code (like this: (vcom-1292) Slice range direction "downto" specified in slice with prefix of unknown direction. This is just an example message; I understand what it means.
I assume that Mentor has a list of all possible error codes and a more elaborate description of what they mean, and how to avoid them. I did not find this error code in the PDFs that come with ModelSim, nor did I find it through Google. Any pointers anybody?
There is a modelsim command called verror with an -all option to list them all, and other options to inspect the messages further.
if you are interested in finding out information about a certain error then use the verror command in the Questasim GUI.
verror
Better than going through the entire list. :)