| 47 | }; |
| 48 | |
| 49 | class invalid_utf8 : public exception { |
| 50 | uint8_t u8; |
| 51 | public: |
| 52 | invalid_utf8 (uint8_t u) : u8(u) {} |
| 53 | virtual const char* what() const throw() { return "Invalid UTF-8"; } |
| 54 | uint8_t utf8_octet() const {return u8;} |
| 55 | }; |
| 56 | |
| 57 | class invalid_utf16 : public exception { |
| 58 | uint16_t u16; |