CodePorting.Translator.Cs2Cpp.Framework
System::IO::Details_FileNotFoundException Class Reference

The exception that is thrown when an attempt to access a file that does not exist on disk fails. Never create instances of this class manually. Use the FileNotFoundException class instead. Never wrap the FileNotFoundException class instances into System::SmartPtr. More...

#include <file_not_found_exception.h>

Inherits System::Details_ExceptionWithFilename< Details_IOException >.

Protected Member Functions

 Details_FileNotFoundException ()
 Initializes a new instance of the FileNotFoundException class with its message string set to a system-supplied message. More...
 
 Details_FileNotFoundException (const String &message)
 Initializes a new instance of the FileNotFoundException class with a specified error message. More...
 
 Details_FileNotFoundException (const String &message, const System::Exception &innerException)
 Initializes a new instance of the FileNotFoundException class with a specified error message and a reference to the inner exception that is the cause of this exception. More...
 
 Details_FileNotFoundException (const String &message, const String &fileName)
 Initializes a new instance of the FileNotFoundException class with a specified error message, and the file name that cannot be found. More...
 
 Details_FileNotFoundException (const String &message, const String &fileName, const System::Exception &innerException)
 Initializes a new instance of the FileNotFoundException class with a specified error message, the file name that cannot be found, and a reference to the inner exception that is the cause of this exception. More...
 
void DoThrow (const System::ExceptionPtr &self) const override
 
- Protected Member Functions inherited from System::Details_ExceptionWithFilename< Details_IOException >
 Details_ExceptionWithFilename ()
 Initializes a new instance with an empty file name. More...
 
 Details_ExceptionWithFilename (const String &message)
 Initializes a new instance with a specified error message and an empty file name. More...
 
 Details_ExceptionWithFilename (const String &message, const Exception &innerException)
 Initializes a new instance with a specified error message, a reference to the inner exception that is the cause of this exception, and an empty file name. More...
 
 Details_ExceptionWithFilename (const String &message, const String &fileName)
 Initializes a new instance with a specified error message and a specified filename. More...
 
 Details_ExceptionWithFilename (const String &message, const String &fileName, const Exception &innerException)
 Initializes a new instance with a specified error message, a reference to the inner exception that is the cause of this exception, and a specified file name. More...
 
virtual String ExtraDescription () const override
 

Additional Inherited Members

- Public Member Functions inherited from System::Details_ExceptionWithFilename< Details_IOException >
virtual String get_FileName () const
 Gets the name of the file that causes this exception. More...
 
virtual String get_Message () const override
 
virtual String ToString () const override
 

Detailed Description

The exception that is thrown when an attempt to access a file that does not exist on disk fails. Never create instances of this class manually. Use the FileNotFoundException class instead. Never wrap the FileNotFoundException class instances into System::SmartPtr.

Constructor & Destructor Documentation

◆ Details_FileNotFoundException() [1/5]

System::IO::Details_FileNotFoundException::Details_FileNotFoundException ( )
protected

Initializes a new instance of the FileNotFoundException class with its message string set to a system-supplied message.

◆ Details_FileNotFoundException() [2/5]

System::IO::Details_FileNotFoundException::Details_FileNotFoundException ( const String message)
protected

Initializes a new instance of the FileNotFoundException class with a specified error message.

Parameters
messageA description of the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

◆ Details_FileNotFoundException() [3/5]

System::IO::Details_FileNotFoundException::Details_FileNotFoundException ( const String message,
const System::Exception innerException 
)
protected

Initializes a new instance of the FileNotFoundException class with a specified error message and a reference to the inner exception that is the cause of this exception.

Parameters
messageA description of the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
innerExceptionThe exception that is the cause of the current exception. If the innerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.

◆ Details_FileNotFoundException() [4/5]

System::IO::Details_FileNotFoundException::Details_FileNotFoundException ( const String message,
const String fileName 
)
protected

Initializes a new instance of the FileNotFoundException class with a specified error message, and the file name that cannot be found.

Parameters
messageA description of the error, or null to use a system-supplied message with the given fileName. The content of message should be understood by humans. The caller of this constructor must ensure that this string has been localized for the current system culture.
fileNameThe full name of the file with the invalid image.

◆ Details_FileNotFoundException() [5/5]

System::IO::Details_FileNotFoundException::Details_FileNotFoundException ( const String message,
const String fileName,
const System::Exception innerException 
)
protected

Initializes a new instance of the FileNotFoundException class with a specified error message, the file name that cannot be found, and a reference to the inner exception that is the cause of this exception.

Parameters
messageThe error message that explains the reason for the exception.
fileNameThe full name of the file with the invalid image.
innerExceptionThe exception that is the cause of the current exception. If the innerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.

Member Function Documentation

◆ DoThrow()

void System::IO::Details_FileNotFoundException::DoThrow ( const System::ExceptionPtr self) const
overrideprotected
See also
Exception::DoThrow