-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExceptions.h
More file actions
44 lines (38 loc) · 991 Bytes
/
Exceptions.h
File metadata and controls
44 lines (38 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#pragma once
#include "LIB.h"
#include "Guest.h"
class name_exception
{
string w_name;
public:
name_exception(const string& wrongname) :w_name(wrongname) {}
const string& get_name_error() const { return w_name; }
};
class surname_exception
{
string w_surname;
public:
surname_exception(const string& wrongsurname) :w_surname(wrongsurname) {}
const string& get_surname_error() const { return w_surname; }
};
class last_name_exception
{
string w_last_name;
public:
last_name_exception(const string& wronglastname) :w_last_name(wronglastname) {}
const string& get_last_name_error() const { return w_last_name; }
};
class phone_exception
{
string w_phone;
public:
phone_exception(const string& wrongphone) :w_phone(wrongphone) {}
const string& get_phone_error() const { return w_phone; }
};
class street_exception
{
string w_street;
public:
street_exception(const string& wrongstreet) :w_street(wrongstreet) {}
const string& get_street_error() const { return w_street; }
};