strusBase  0.17
error.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Patrick P. Frey
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
10 #ifndef _STRUS_STORAGE_ERROR_LIB_HPP_INCLUDED
11 #define _STRUS_STORAGE_ERROR_LIB_HPP_INCLUDED
12 #include "strus/errorCodes.hpp"
13 #include <cstdio>
14 
16 namespace strus {
17 
19 class ErrorBufferInterface;
21 class DebugTraceInterface;
22 
25 DebugTraceInterface* createDebugTrace_standard( std::size_t maxNofThreads_);
26 
30 bool dumpDebugTrace( DebugTraceInterface* debugTrace, const char* filename);
31 
36 ErrorBufferInterface* createErrorBuffer_standard( FILE* logfilehandle, std::size_t maxNofThreads_, DebugTraceInterface* debugTrace);
37 
41 int errorCodeFromMessage( char const*& msgitr);
42 
45 void removeErrorCodesFromMessage( char* msg);
46 
50 const char* errorCodeToString( int errcode);
51 
52 }//namespace
53 #endif
54 
int errorCodeFromMessage(char const *&msgitr)
Get the next error code in an error message printed by the standard error buffer implementation provi...
DebugTraceInterface * createDebugTrace_standard(std::size_t maxNofThreads_)
Create an debug trace interface.
bool dumpDebugTrace(DebugTraceInterface *debugTrace, const char *filename)
Dump the trace content in a convenient form to a file specified.
void removeErrorCodesFromMessage(char *msg)
Remove all error codes in an error message printed by the standard error buffer implementation provid...
const char * errorCodeToString(int errcode)
Get the error message as string.
Structured error codes for strus components.
ErrorBufferInterface * createErrorBuffer_standard(FILE *logfilehandle, std::size_t maxNofThreads_, DebugTraceInterface *debugTrace)
Create an error buffer interface.