top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How should runtime errors be handled in C++?

+1 vote
401 views
How should runtime errors be handled in C++?
posted Dec 2, 2014 by Roshan

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

-The runtime errors in C++ can be handled using exceptions.
-This exception handling mechanism in C++ is developed to handle the errors in software made up of independently developed components operating in one process and under synchronous control.
-According to C++, any routine that does not fulfil its promise throws an exception. The caller who knows the way to handle these exceptions can catch it.

answer Dec 2, 2014 by Shivaranjini
0 votes

Using Exception Handling;
Try, Throw and Catch

and also through GDB, i.e gnu debuger

answer Dec 2, 2014 by Chirag Gangdev
Similar Questions
0 votes

I have a disk image of a small embedded device whose root file system I'd like to check-in to git as a means of distributing its GPL'd software. In that disk image are device files, which GIT studiously ignores. If symlinks are handled (contents being the path that the symlink points at), I don't see why device files can't be handled (contents being the type (char or block) and the major and minor device number). TAR, for example, handles this fine, except that using tar in git sort-of goes against the granularity of the objects being modified (like adding a bunch of extra "sd??" devices), such that you are modifying a whole tar ball instead of the individual (device) files.

Is there a reason not to handle device files other than "its not traditional"? That's the only reason given in google or the IRC channel.

...