-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better error handling in lpmln binary
- Loading branch information
1 parent
91ed436
commit 05d6fe9
Showing
5 changed files
with
59 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include <string> | ||
#include <exception> | ||
|
||
#pragma once | ||
|
||
class NoLanguageSelectedException : public std::exception{ | ||
public: | ||
NoLanguageSelectedException(std::string); | ||
NoLanguageSelectedException(); | ||
~NoLanguageSelectedException(); | ||
|
||
const char* what() const throw(){ | ||
return str.c_str(); | ||
} | ||
|
||
private: | ||
std::string str; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include "exceptions/NoLanguageSelectedException.h" | ||
|
||
NoLanguageSelectedException::~NoLanguageSelectedException(){} | ||
|
||
NoLanguageSelectedException::NoLanguageSelectedException(std::string _str){ | ||
str = _str; | ||
} | ||
|
||
NoLanguageSelectedException::NoLanguageSelectedException(){} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters