Question Khalid Saleem · Feb 5, 2018

I am trying to determine the write-access to a windows-directory, using the method %File.Writeable(). But, this method always returns the boolean "true", even when I have revoked the write-access of Healthshare-user in this directory.

Note:

  1. When the same ensemble-service tries to write a file in this directory (which it says is "writeable"), it fails.
  2. The method %File.Writeable(...) works perfectly in the case of files.

Any help is appreciated. Thanks in advance... :-)

17
0 1158
Question Khalid Saleem · Jun 2, 2017

Hi,

I am trying to generate a custom error-code using the following code

Class ISG.CommonBilling.Service.Test1 Extends EnsLib.HL7.Operation.TCPOperation
{
	ClassMethod khalid() As %Status
	{
		Set tSC=$$$ERROR("10001","I am here")
		write $$$GETERRORCODE(tSC)_$char(13,10)
		write $SYSTEM.Status.GetErrorText(tSC)
	}
}

And here is the output:

KINDRED>do ##class(ISG.CommonBilling.Service.Test1).khalid()
10001
ERROR #10001: Unknown status code: 10001 (I am here)

QUERY: Is there any way I can remove the part "Unknown status code: 10001 (...)" in the error-text?

Thanks in advance, Khalid

5
0 1475