3 Replies - 1039 Views - Last Post: 20 November 2013 - 11:32 AM Rate Topic: -----

#1 AnalyticLunatic  Icon User is offline

  • D.I.C Lover

Reputation: 221
  • View blog
  • Posts: 1,030
  • Joined: 25-June 12

Breakdown of Exceptions/Meanings in C/C++?

Posted 20 November 2013 - 10:31 AM

My programming languages book has the following Table in a section about Exception Handling Semantics. Can anyone point me to a similar table breakdown for C?

This isn't quite what I was after for C++, but may work: C++ Exception Class

Predefined I/O Exceptions in Ada
Exception       Meaning

Status_Error    Attempt to read or write to a file that is not open.
Mode_Error      Attempt to read form an output file or write to an input file.
Name_Error      Use of an improper file name in an open command.
Use_Error       Attempt to output on an input device (e.g., the keyboard)
Device_Error    Hardware malfunction.
End_Error       Attempt to read past end of file.
Data_Error      Value read is incompatible with the type of the target variable.
Layout_Error    Attempt to set column or line number outside its boundary.



Is This A Good Question/Topic? 0
  • +

Replies To: Breakdown of Exceptions/Meanings in C/C++?

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10437
  • View blog
  • Posts: 38,649
  • Joined: 27-December 08

Re: Breakdown of Exceptions/Meanings in C/C++?

Posted 20 November 2013 - 10:33 AM

Moved to C/C++. Please post programming help questions in the appropriate forums rather than Student Campus.
Was This Post Helpful? 0
  • +
  • -

#3 jimblumberg  Icon User is offline

  • member icon


Reputation: 4002
  • View blog
  • Posts: 12,346
  • Joined: 25-December 09

Re: Breakdown of Exceptions/Meanings in C/C++?

Posted 20 November 2013 - 11:06 AM

There are no exceptions in standard C.

Jim
Was This Post Helpful? 1
  • +
  • -

#4 vividexstance  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 651
  • View blog
  • Posts: 2,240
  • Joined: 31-December 10

Re: Breakdown of Exceptions/Meanings in C/C++?

Posted 20 November 2013 - 11:32 AM

The only thing close to exceptions in C is the return value for some of the standard C library functions and system calls. They typically return some kind of error value to indicate an error has occurred. You should be able to see what a function returns by looking that function up online or through the man pages if you're on a *nix type system.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1