Hi experts,
I have a table where i am capturing 2 filepath location.
The following code is to ensure that error is thrown on an event when folder location is not set. This works fine for else loop but not for if loop.
When setting the folder validated in if condition as blank I just get CLR object not initialized error message, "Object 'CLRObject' could not be created" .
Please suggest a fix so that i can get it to work just like my else validation where i get full error message of else condition.
public void run() { System.IO.DirectoryInfo directory; System.IO.FileInfo[] files; System.IO.FileInfo file; InteropPermission permission; counter filesCount; FilePath processedFilePath,processedFileCompletePath; Filename filename; Filename tmpFilePath = System.IO.Path::GetTempPath(); Filename tmpFileNameShort; Filename tmpFileExt; int fromLine = infologLine(); counter loop; str fileNameTemp,fileNameString; boolean skipZeroTrans; str cLRExceptionMsg; #FILE try { permission = new InteropPermission(InteropKind::ClrInterop); permission.assert(); select myTable; directory = new System.IO.DirectoryInfo(@myTable.1stFilepath); //GET Object 'CLRObject' could not be created as soon as it hits this line in debugger processedFilePath = @myTable.2ndFilepath; // WHEN testing this condition it works as expected, i.e go to else loop get the error details go in catch call my log write message & write details in there. if ( directory == null || processedFilePath == '') { if (directory == null) { throw error ('Error 1 details'); } else { throw error ('Error 2 details'); } } } // Try ends catch { this.myWriteLogMethod(tmpFilePath,tmpFileNameShort,fromLine); throw error(strfmt("@SYS63093",funcName())); } }//Run method ends