[flexcoders] Re: Catching/Trapping Error #3003: File or directory does not exist

2011-08-22 Thread valdhor
What does model.networkDriveLetter actually hold? Is it just the drive letter 
or is the colon attached as well?

Perhaps the call is failing even before the resolve tries to happen.

You may like to check the code in resolvePath to see how it works and where it 
throws the error.

--- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@... wrote:

 Thanks for the reply. I tried the following listeners, all to no avail.
 File.desktopDirectory.addEventListener(IOErrorEvent.STANDARD_ERROR_IO_ER\
 ROR,onSourceFileIoError)
 File.desktopDirectory.addEventListener(IOErrorEvent.NETWORK_ERROR,onSour\
 ceFileIoError)
 File.desktopDirectory.addEventListener(IOErrorEvent.STANDARD_INPUT_IO_ER\
 ROR,onSourceFileIoError)
 File.desktopDirectory.addEventListener(IOErrorEvent.STANDARD_OUTPUT_IO_E\
 RROR,onSourceFileIoError)File.desktopDirectory.addEventListener(IOErrorE\
 vent.IO_ERROR,onSourceFileIoError)
 Suggestions?
 Thanks, in advance.
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  Try attaching a listener to File.desktopDirectory
 
 
  On 8/19/11 8:40 AM, sdl1326 azsl1326-email@ wrote:
 
 
 
 
 
 
  I am getting the following error:
 
  Error #2044: Unhandled IOErrorEvent:. text=Error #3003: File or
 directory does not exist
  How can I trap this error? I have tried using a Try/Catch as well as a
 listener - see code below:
 
 
 
  try {
 
  var sourceFile:File = new File();
 
 
 sourceFile.addEventListener(IOErrorEvent.IO_ERROR,onSourceFileIoError);
 
  sourceFile = File.desktopDirectory.resolvePath(
 model.networkDriveLetter + \\ + event.payload.asset_location );
 
  }
  catch(e:Error){trace('an error has occurred')};
 
 
  However, neither of these seems to trap the error. Suggestions?
 
  Thanks, in advance.
 
 
 
 
 
  --
  Alex Harui
  Flex SDK Team
  Adobe System, Inc.
  http://blogs.adobe.com/aharui
 





[flexcoders] Re: Catching/Trapping Error #3003: File or directory does not exist

2011-08-19 Thread valdhor
Clasping at straws...

Maybe it's not an IO_ERROR type of IOErrorEvent so it's not being handled.

You could try adding listeners for all types of IOErrorEvent.

--- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@... wrote:

 
 I am getting the following error:
 Error #2044: Unhandled IOErrorEvent:. text=Error #3003: File or
 directory does not exist
 How can I trap this error? I have tried using a Try/Catch as well as a
 listener - see code below:
 
 
 
 
 try {
 
 var sourceFile:File = new File();
 
 sourceFile.addEventListener(IOErrorEvent.IO_ERROR,onSourceFileIoError);
 
 sourceFile = File.desktopDirectory.resolvePath( model.networkDriveLetter
 + \\ + event.payload.asset_location );
 
 }
 catch(e:Error){trace('an error has occurred')};
 
 
 
 However, neither of these seems to trap the error. Suggestions?
 
 Thanks, in advance.





[flexcoders] Re: Catching/Trapping Error #3003: File or directory does not exist

2011-08-19 Thread sdl1326
Thanks for the reply. I tried the following listeners, all to no avail.
File.desktopDirectory.addEventListener(IOErrorEvent.STANDARD_ERROR_IO_ER\
ROR,onSourceFileIoError)
File.desktopDirectory.addEventListener(IOErrorEvent.NETWORK_ERROR,onSour\
ceFileIoError)
File.desktopDirectory.addEventListener(IOErrorEvent.STANDARD_INPUT_IO_ER\
ROR,onSourceFileIoError)
File.desktopDirectory.addEventListener(IOErrorEvent.STANDARD_OUTPUT_IO_E\
RROR,onSourceFileIoError)File.desktopDirectory.addEventListener(IOErrorE\
vent.IO_ERROR,onSourceFileIoError)
Suggestions?
Thanks, in advance.

--- In flexcoders@yahoogroups.com, Alex Harui aharui@... wrote:

 Try attaching a listener to File.desktopDirectory


 On 8/19/11 8:40 AM, sdl1326 azsl1326-email@... wrote:






 I am getting the following error:

 Error #2044: Unhandled IOErrorEvent:. text=Error #3003: File or
directory does not exist
 How can I trap this error? I have tried using a Try/Catch as well as a
listener - see code below:



 try {

 var sourceFile:File = new File();


sourceFile.addEventListener(IOErrorEvent.IO_ERROR,onSourceFileIoError);

 sourceFile = File.desktopDirectory.resolvePath(
model.networkDriveLetter + \\ + event.payload.asset_location );

 }
 catch(e:Error){trace('an error has occurred')};


 However, neither of these seems to trap the error. Suggestions?

 Thanks, in advance.





 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui