MyVector
myexceptions.cpp
Go to the documentation of this file.
1 #include "myexceptions.h"
2 #include <cstdlib> // exit
3 #include <iostream>
4 
5 using namespace std;
6 
7 void my_new_handler(void)
8 {
9  cerr << " Nicht genuegend Speicher vorhanden" << endl;
10  cerr << " Beendigung des Programmes" << endl;
11 
12  exit (-1); // Fehlercode an Umgebung
13 }
14 
15 
16 OutOfRange :: OutOfRange(const long long int &i, const long long int &l) // Konstruktor
17  : index(i), end_interval(l)
18 {
19  cerr << "Index " << i << " is not in interval [ 0, " << l << " ]" << endl;
20 }
21 
22 
OutOfRange(const long long int &i, const long long int &l)
Constructor that has to be used with "throw".
void my_new_handler(void)
Definition: myexceptions.cpp:7