13 lines
No EOL
548 B
Markdown
13 lines
No EOL
548 B
Markdown
## Linux compilation
|
|
|
|
> mkdir build
|
|
> cd build
|
|
> cmake -DCMAKE_BUILD_TYPE=Debug ..
|
|
> make
|
|
|
|
## Exercise 1
|
|
|
|
* Create an exception class `Exception` which inherits from `std`::exception` and two classes `ParserException` and `ReaderException` which inherit form class `Exception`.
|
|
* Rewrite a code to `ParserException` in the method `parse` and `ReaderException` in the method `read`.
|
|
* Try to catch errors in `main` and print them
|
|
* Rewrite a code once again and return `nullopt` when an error occurs instead of throwing an exception |