---
name: "sc_FileOperationFailed"
section: "3"
platform: "linux"
package: "libsc-doc"
version: "2.3.1-22"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_FileOperationFailed"
---

# sc\_FileOperationFailed(3)

This is thrown when an operation on a file fails.

## NAME

sc::FileOperationFailed - This is thrown when an operation on a file fails.

## SYNOPSIS

`#include <scexception.h>`

Inherits **sc::SystemException**.

### Public Types

enum **FileOperation** { **Unknown**, **OpenR**, **OpenW**, **OpenRW**, **Close**, **Read**, **Write**, **Corrupt**, **Other** }\

### Public Member Functions

**FileOperationFailed** (const char \*description=0, const char \*source\_file=0, int line=0, const char \***filename**=0, FileOperation operation=Unknown, const **ClassDesc** \*class\_desc=0, const char \*exception\_type='FileOperationFailed')  throw ()\
 **FileOperationFailed** (const **FileOperationFailed** &)  throw ()\
 const char \* **filename** () const  throw ()\
 Returns the file name of the file that caused the error, if known.  FileOperation **operation** () const  throw ()\

## Detailed Description

This is thrown when an operation on a file fails.

## Member Function Documentation

### const char \* sc::FileOperationFailed::filename () const` [inline]`

Returns the file name of the file that caused the error, if known. Otherwise 0 is returned.

## Author

Generated automatically by Doxygen for MPQC from the source code.
