c# - File.Copy method -


is posiible following code doesn't throw exception , doesn't copy files?

void copy2(string from, string to) {     lock (_thislock)     {      if (file.exists(from))      {       file.copy(from, to, true);       return;      }      logger.write("file not exists");     } } 

customer says application doesn't crash , doesn't copy file, , doesn't write log. logger's type microsoft.practices.enterpriselibrary.logging.logger.

sure, if file doesn't exist - (!file.exists) - file.copy call won't reached.

logger.write not count exception.

if, update suggests, there nothing in logs, double check logger.write function. implemented correctly? there exception being thrown , handled within method? more file.copy failing without throwing exception.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -