| 836 | } |
| 837 | |
| 838 | static const char* getErrorMessage (ErrorCode errorCode) |
| 839 | { |
| 840 | switch (errorCode) |
| 841 | { |
| 842 | case ErrorCode::NEED_DICT: return "need dictionary"; |
| 843 | case ErrorCode::STREAM_END: return "stream end"; |
| 844 | case ErrorCode::OK: return ""; |
| 845 | case ErrorCode::ERRNO: return "file error"; |
| 846 | case ErrorCode::STREAM_ERROR: return "stream error"; |
| 847 | case ErrorCode::DATA_ERROR: return "data error"; |
| 848 | case ErrorCode::MEM_ERROR: return "insufficient memory"; |
| 849 | case ErrorCode::BUF_ERROR: return "buffer error"; |
| 850 | case ErrorCode::VERSION_ERROR: return "incompatible version"; |
| 851 | default: return ""; |
| 852 | } |
| 853 | } |
| 854 | |
| 855 | ErrorCode setError (ErrorCode errorCode) |
| 856 | { |
nothing calls this directly
no outgoing calls
no test coverage detected