<commit_before>/*******************************************************************
Qt extended Library 
Copyright (C) 2006 <NAME>
released under the Terms of LGPL (see the LICENSE file)
*******************************************************************/

#ifndef QXTERROR_H
#define QXTERROR_H

#include <Qxt/qxtglobal.h>
#include <Qxt/qxtnamespace.h>

/**
\class QxtError QxtError

\ingroup core

\brief Information about Errors ocuring inside Qxt

might add more features in future.
*/

/*! \relates QxtError
droping an error inside a function that returns QxtError


short for return  QxtError(__FILE__,__LINE__,x);
*/
#define QXT_DROP(x) return QxtError(__FILE__,__LINE__,x);


/*! \relates QxtError
droping no error inside a function that returns QxtError

short for return QxtError(__FILE__,__LINE__,Qxt::NoError);
*/
#define QXT_DROP_OK return QxtError(__FILE__,__LINE__,Qxt::NoError);


/*! \relates QxtError
forward a drop


drops from this function if the call inside dropped too.
the inner function must return or be a QxtError.

example
\code
QXT_DROP_F(critical_function());
\endcode

*/
#define QXT_DROP_F(call) {QxtError error_sds = call; if (error_sds != Qxt::NoError )return error_sds; }



class QXT_CORE_EXPORT QxtError
	{
	public:
		QxtError(char * file, long line, Qxt::ErrorCode errorcode)
			{
			file_m=file;
			line_m=line;
			errorcode_m=errorcode;
			}


		Qxt::ErrorCode errorCode() const
			{return errorcode_m;}

		long line() const
			{return line_m;}

		char * file() const
			{return file_m;}

	private:
		Qxt::ErrorCode errorcode_m;
		long line_m;
		char * file_m;
	};


#endif
<commit_msg>forgot the magic scalar operator<commit_after>/*******************************************************************
Qt extended Library 
Copyright (C) 2006 <NAME>
released under the Terms of LGPL (see the LICENSE file)
*******************************************************************/

#ifndef QXTERROR_H
#define QXTERROR_H

#include <Qxt/qxtglobal.h>
#include <Qxt/qxtnamespace.h>

/**
\class QxtError QxtError

\ingroup core

\brief Information about Errors ocuring inside Qxt

might add more features in future.
*/

/*! \relates QxtError
droping an error inside a function that returns QxtError


short for return  QxtError(__FILE__,__LINE__,x);
*/
#define QXT_DROP(x) return QxtError(__FILE__,__LINE__,x);


/*! \relates QxtError
droping no error inside a function that returns QxtError

short for return QxtError(__FILE__,__LINE__,Qxt::NoError);
*/
#define QXT_DROP_OK return QxtError(__FILE__,__LINE__,Qxt::NoError);


/*! \relates QxtError
forward a drop


drops from this function if the call inside dropped too.
the inner function must return or be a QxtError.

example
\code
QXT_DROP_F(critical_function());
\endcode

*/
#define QXT_DROP_F(call) {QxtError error_sds = call; if (error_sds != Qxt::NoError )return error_sds; }



class QXT_CORE_EXPORT QxtError
	{
	public:
		QxtError(char * file, long line, Qxt::ErrorCode errorcode)
			{
			file_m=file;
			line_m=line;
			errorcode_m=errorcode;
			}


		Qxt::ErrorCode errorCode() const
			{return errorcode_m;}

		long line() const
			{return line_m;}

		char * file() const
			{return file_m;}

		operator Qxt::ErrorCode()
			{
			return errorcode_m;
			}


	private:
		Qxt::ErrorCode errorcode_m;
		long line_m;
		char * file_m;
	};


#endif

{'fraction_non_alphanumeric': 0.17016806722689076, 'fraction_numerical': 0.0024009603841536613, 'mean_word_length': 4.867957746478873, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6395447', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1102, 'n_words': 320}