I too use ErrorText() to retrieve more information whenever any of the COM 
interfaces returns a non-zero value but most of the time the messages are 
cryptic like:
"domain error"
"length error"
etc.

Over the years, I realized that once you have tested your J code/script most of 
the problems that occurs are data related ... hence my error handlers evaluates 
data passed to J before throwing a dialog box with appropriate error and 
recovery information. 


On Oct 15, 2010, at 5:50 AM, David Mitchell wrote:

> I have not been able to get GetM to work with C#.
> 
> But, when I was trying out variations based on your example, I did find that 
> the 
> following code worked to help find out the text form of at least some of the 
> returned errors:
> 
> foo = jObject.SetB(name, ref value);
> foo = jObject.ErrorText((int)foo,out jmsg);
> 
> Perhaps this would help with the error you are seeing.
> 
> Good luck,
> --
> David Mitchell
> 
> On 10/14/2010 12:27, Martin Pelletier wrote:
>>   How does GetM work? I get a return error of -2. Are error codes
>> documented?
>> 
>> Martin Pelletier
>> 
>> On 2010-10-12 13:45, David Mitchell wrote:
>>> Some random notes:
>>> 
>>> Function Get(jname As String, v) As Long
>>>       Member of JDLLServerLib.JDLLServer
>>>       Get variant value from J variable.
>>> 
>>> Function GetB(jname As String, v) As Long
>>>       Member of JDLLServerLib.JDLLServer
>>>       Get variant value from J variable (BSTR).
>>> 
>>> Function GetM(jname As String, jtype As Long, jrank As Long, jshape As Long,
>>> jdata As Long) As Long
>>>       Member of JDLLServerLib.JDLLServer
>>>       Get J variable description and memory addresses of shape and data.
>>> 
>>> ===
>>> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to