\doxysubsubsection{Error}
\hypertarget{group__Eina__Error__Group}{}\label{group__Eina__Error__Group}\index{Error@{Error}}
\doxysubsubsubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group__Eina__Error__Group_ga637bff52ecef75ad46993950450347ae}{EINA\+\_\+\+ERROR\+\_\+\+NO\+\_\+\+ERROR}}~((\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}})0)
\begin{DoxyCompactList}\small\item\em No error reported. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef int \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}}
\begin{DoxyCompactList}\small\item\em The integer type containing the error type. \end{DoxyCompactList}\item 
typedef \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Error__Group_gad5645c25e5c3d6cd11d07567d685fe39}{Eina\+\_\+\+Success\+\_\+\+Flag}}
\begin{DoxyCompactList}\small\item\em A flag indicating a function completed succesfully. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} \mbox{\hyperlink{group__Eina__Error__Group_ga570f3e9a6807baf3f14168d205e5050a}{eina\+\_\+error\+\_\+msg\+\_\+register}} (const char \texorpdfstring{$\ast$}{*}msg)
\begin{DoxyCompactList}\small\item\em Registers a new error type. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} \mbox{\hyperlink{group__Eina__Error__Group_ga4a2be38f81f21dab8472ffb6bfd49ab7}{eina\+\_\+error\+\_\+msg\+\_\+static\+\_\+register}} (const char \texorpdfstring{$\ast$}{*}msg)
\begin{DoxyCompactList}\small\item\em Registers a new error type, statically allocated message. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Error__Group_ga7c88d2d4c5b4bff53c2a7ccbca69b33e}{eina\+\_\+error\+\_\+msg\+\_\+modify}} (\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} error, const char \texorpdfstring{$\ast$}{*}msg)
\begin{DoxyCompactList}\small\item\em Changes the message of an already registered message. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} \mbox{\hyperlink{group__Eina__Error__Group_gaf1afffc7dc1e11101f47c5d14d9c5347}{eina\+\_\+error\+\_\+get}} (void)
\begin{DoxyCompactList}\small\item\em Returns the last set error. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void \mbox{\hyperlink{group__Eina__Error__Group_ga7e6b1448d7730fc821736bda8964d739}{eina\+\_\+error\+\_\+set}} (\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} err)
\begin{DoxyCompactList}\small\item\em Sets the last error. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} const char \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Error__Group_gac420af42486bcbb879c4be67eacc6c2a}{eina\+\_\+error\+\_\+msg\+\_\+get}} (\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} error)
\begin{DoxyCompactList}\small\item\em Returns the description of the given error number. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} \mbox{\hyperlink{group__Eina__Error__Group_ga55ca37e4889513a4d5f02aba788d51bc}{eina\+\_\+error\+\_\+find}} (const char \texorpdfstring{$\ast$}{*}msg)
\begin{DoxyCompactList}\small\item\em Finds the \doxylink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error} corresponding to a message string. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{group__Eina__Error__Group_ga2fea0145c90909466c044d99c070a273}\label{group__Eina__Error__Group_ga2fea0145c90909466c044d99c070a273} 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} EINA\+\_\+\+ERROR\+\_\+\+OUT\+\_\+\+OF\+\_\+\+MEMORY {\bfseries EINA\+\_\+\+DEPRECATED}
\end{DoxyCompactItemize}


\doxysubsubsubsection{Detailed Description}


This group discusses the functions that provide error management for projects.

The Eina error module provides a way to manage errors in a simple but powerful way in libraries and modules. It is also used in Eina itself. An extension to libC\textquotesingle{}s {\ttfamily errno} and strerror() facilities, this is extensible and recommended for other libraries and applications as well.

While libC\textquotesingle{}s {\ttfamily errno} is fixed, Eina\+\_\+\+Error can be extended by libraries and applications with domain-\/specific codes and associated error messages. All {\ttfamily errno.\+h} codes are usable seamlessly with Eina\+\_\+\+Error. The constants defined in errno.\+h will have messages as reported by strerror() in \doxylink{group__Eina__Error__Group_gac420af42486bcbb879c4be67eacc6c2a}{eina\+\_\+error\+\_\+msg\+\_\+get()}

Success (no-\/error) condition is reported with Eina\+\_\+\+Error 0 (\doxylink{group__Eina__Error__Group_ga637bff52ecef75ad46993950450347ae}{EINA\+\_\+\+ERROR\+\_\+\+NO\+\_\+\+ERROR}).

A simple example of how to use this can be seen \doxysectlink{tutorial_error_page}{here}{0}. 

\doxysubsubsubsection{Macro Definition Documentation}
\Hypertarget{group__Eina__Error__Group_ga637bff52ecef75ad46993950450347ae}\label{group__Eina__Error__Group_ga637bff52ecef75ad46993950450347ae} 
\index{Error@{Error}!EINA\_ERROR\_NO\_ERROR@{EINA\_ERROR\_NO\_ERROR}}
\index{EINA\_ERROR\_NO\_ERROR@{EINA\_ERROR\_NO\_ERROR}!Error@{Error}}
\doxysubsubsubsubsection{\texorpdfstring{EINA\_ERROR\_NO\_ERROR}{EINA\_ERROR\_NO\_ERROR}}
{\footnotesize\ttfamily \#define EINA\+\_\+\+ERROR\+\_\+\+NO\+\_\+\+ERROR~((\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}})0)}



No error reported. 

This is a convenience macro for people that are extra verbose, same as "{}0"{}. 

\doxysubsubsubsection{Typedef Documentation}
\Hypertarget{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}\label{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686} 
\index{Error@{Error}!Eina\_Error@{Eina\_Error}}
\index{Eina\_Error@{Eina\_Error}!Error@{Error}}
\doxysubsubsubsubsection{\texorpdfstring{Eina\_Error}{Eina\_Error}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}}}



The integer type containing the error type. 

Errors are registered with \doxylink{group__Eina__Error__Group_ga570f3e9a6807baf3f14168d205e5050a}{eina\+\_\+error\+\_\+msg\+\_\+register()}, \doxylink{group__Eina__Error__Group_ga4a2be38f81f21dab8472ffb6bfd49ab7}{eina\+\_\+error\+\_\+msg\+\_\+static\+\_\+register()} or those inherited from the system\textquotesingle{}s {\ttfamily errno.\+h} such as {\ttfamily ENOMEM}. \Hypertarget{group__Eina__Error__Group_gad5645c25e5c3d6cd11d07567d685fe39}\label{group__Eina__Error__Group_gad5645c25e5c3d6cd11d07567d685fe39} 
\index{Error@{Error}!Eina\_Success\_Flag@{Eina\_Success\_Flag}}
\index{Eina\_Success\_Flag@{Eina\_Success\_Flag}!Error@{Error}}
\doxysubsubsubsubsection{\texorpdfstring{Eina\_Success\_Flag}{Eina\_Success\_Flag}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Error__Group_gad5645c25e5c3d6cd11d07567d685fe39}{Eina\+\_\+\+Success\+\_\+\+Flag}}}



A flag indicating a function completed succesfully. 

Errors are reported with a EINA\+\_\+\+FALSE value for Eina\+\_\+\+Success\+\_\+\+Flag return and success with a EINA\+\_\+\+TRUE. 

\doxysubsubsubsection{Function Documentation}
\Hypertarget{group__Eina__Error__Group_ga570f3e9a6807baf3f14168d205e5050a}\label{group__Eina__Error__Group_ga570f3e9a6807baf3f14168d205e5050a} 
\index{Error@{Error}!eina\_error\_msg\_register@{eina\_error\_msg\_register}}
\index{eina\_error\_msg\_register@{eina\_error\_msg\_register}!Error@{Error}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_error\_msg\_register()}{eina\_error\_msg\_register()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} eina\+\_\+error\+\_\+msg\+\_\+register (\begin{DoxyParamCaption}\item[{const char \texorpdfstring{$\ast$}{*}}]{msg }\end{DoxyParamCaption})}



Registers a new error type. 

This function stores the error message described by {\ttfamily msg} in a list. The returned value is a unique identifier greater than or equal to {\ttfamily 1}. The description can be retrieved later by passing the returned value to \doxylink{group__Eina__Error__Group_gac420af42486bcbb879c4be67eacc6c2a}{eina\+\_\+error\+\_\+msg\+\_\+get()}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em msg} & The description of the error ~\newline
 It is duplicated using \doxylink{group__Eina__Stringshare__Group_ga4e3ce40744291c1fb8574e26883c0bf2}{eina\+\_\+stringshare\+\_\+add()}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The unique number identifier for this error
\end{DoxyReturn}
\begin{DoxyNote}{Note}
There is no need to register messages that exist in libC\textquotesingle{}s {\ttfamily errno.\+h}, such as {\ttfamily ENOMEM} or {\ttfamily EBADF}.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\doxylink{group__Eina__Error__Group_ga4a2be38f81f21dab8472ffb6bfd49ab7}{eina\+\_\+error\+\_\+msg\+\_\+static\+\_\+register()} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}, \mbox{\hyperlink{group__Eina__Stringshare__Group_ga4e3ce40744291c1fb8574e26883c0bf2}{eina\+\_\+stringshare\+\_\+add()}}, and \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}.



Referenced by \mbox{\hyperlink{group__Ecore__Evas__Group_ga32ddbb6457033ad435a177eb0c4fe235}{ecore\+\_\+evas\+\_\+init()}}.

\Hypertarget{group__Eina__Error__Group_ga4a2be38f81f21dab8472ffb6bfd49ab7}\label{group__Eina__Error__Group_ga4a2be38f81f21dab8472ffb6bfd49ab7} 
\index{Error@{Error}!eina\_error\_msg\_static\_register@{eina\_error\_msg\_static\_register}}
\index{eina\_error\_msg\_static\_register@{eina\_error\_msg\_static\_register}!Error@{Error}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_error\_msg\_static\_register()}{eina\_error\_msg\_static\_register()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} eina\+\_\+error\+\_\+msg\+\_\+static\+\_\+register (\begin{DoxyParamCaption}\item[{const char \texorpdfstring{$\ast$}{*}}]{msg }\end{DoxyParamCaption})}



Registers a new error type, statically allocated message. 

This function stores the error message described by {\ttfamily msg} in a list. The returned value is a unique identifier greater than or equal to {\ttfamily 1}. The description can be retrieved later by passing the returned value to \doxylink{group__Eina__Error__Group_gac420af42486bcbb879c4be67eacc6c2a}{eina\+\_\+error\+\_\+msg\+\_\+get()}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em msg} & The description of the error ~\newline
 This string is not duplicated and thus the given pointer should live during the usage of eina\+\_\+error. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The unique number identifier for this error
\end{DoxyReturn}
\begin{DoxyNote}{Note}
There is no need to register messages that exist in libC\textquotesingle{}s {\ttfamily errno.\+h}, such as {\ttfamily ENOMEM} or {\ttfamily EBADF}.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\doxylink{group__Eina__Error__Group_ga570f3e9a6807baf3f14168d205e5050a}{eina\+\_\+error\+\_\+msg\+\_\+register()} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}, and \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.



Referenced by \mbox{\hyperlink{group__Eina__Main__Group_ga81b8137665b8a4d2cb38ca50017d4c74}{eina\+\_\+init()}}.

\Hypertarget{group__Eina__Error__Group_ga7c88d2d4c5b4bff53c2a7ccbca69b33e}\label{group__Eina__Error__Group_ga7c88d2d4c5b4bff53c2a7ccbca69b33e} 
\index{Error@{Error}!eina\_error\_msg\_modify@{eina\_error\_msg\_modify}}
\index{eina\_error\_msg\_modify@{eina\_error\_msg\_modify}!Error@{Error}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_error\_msg\_modify()}{eina\_error\_msg\_modify()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+error\+\_\+msg\+\_\+modify (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}}}]{error,  }\item[{const char \texorpdfstring{$\ast$}{*}}]{msg }\end{DoxyParamCaption})}



Changes the message of an already registered message. 

This function modifies the message associated with {\ttfamily error} and changes it to {\ttfamily msg}. If the error is previously registered by \doxylink{group__Eina__Error__Group_ga4a2be38f81f21dab8472ffb6bfd49ab7}{eina\+\_\+error\+\_\+msg\+\_\+static\+\_\+register} then the string is not duplicated, otherwise the previous message is unref\textquotesingle{}ed and {\ttfamily msg} is copied.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em error} & The Eina\+\_\+\+Error to change the message of \\
\hline
\mbox{\texttt{ in}}  & {\em msg} & The description of the error ~\newline
 This string is duplicated only if the error is registered with \doxylink{group__Eina__Error__Group_ga570f3e9a6807baf3f14168d205e5050a}{eina\+\_\+error\+\_\+msg\+\_\+register}, otherwise it must remain intact for the duration. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\doxylink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE} if successful, otherwise \doxylink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE} on error
\end{DoxyReturn}
\begin{DoxyNote}{Note}
It is not possible to modify messages that exist in libC\textquotesingle{}s {\ttfamily errno.\+h}, such as {\ttfamily ENOMEM} or {\ttfamily EBADF}.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\doxylink{group__Eina__Error__Group_ga570f3e9a6807baf3f14168d205e5050a}{eina\+\_\+error\+\_\+msg\+\_\+register()} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gae7cf7b1d66fa9022242e09fd53c06bb2}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+RETURN\+\_\+\+VAL}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}, \mbox{\hyperlink{group__Eina__Stringshare__Group_ga4e3ce40744291c1fb8574e26883c0bf2}{eina\+\_\+stringshare\+\_\+add()}}, \mbox{\hyperlink{group__Eina__Stringshare__Group_ga5538b4a134987b8a01744fad1a845ba4}{eina\+\_\+stringshare\+\_\+del()}}, and \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}.

\Hypertarget{group__Eina__Error__Group_gaf1afffc7dc1e11101f47c5d14d9c5347}\label{group__Eina__Error__Group_gaf1afffc7dc1e11101f47c5d14d9c5347} 
\index{Error@{Error}!eina\_error\_get@{eina\_error\_get}}
\index{eina\_error\_get@{eina\_error\_get}!Error@{Error}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_error\_get()}{eina\_error\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} eina\+\_\+error\+\_\+get (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Returns the last set error. 

This function returns the last error set by \doxylink{group__Eina__Error__Group_ga7e6b1448d7730fc821736bda8964d739}{eina\+\_\+error\+\_\+set()}. The description of the message is returned by \doxylink{group__Eina__Error__Group_gac420af42486bcbb879c4be67eacc6c2a}{eina\+\_\+error\+\_\+msg\+\_\+get()}.

\begin{DoxyReturn}{Returns}
The last error or 0 (\doxylink{group__Eina__Error__Group_ga637bff52ecef75ad46993950450347ae}{EINA\+\_\+\+ERROR\+\_\+\+NO\+\_\+\+ERROR}).
\end{DoxyReturn}
\begin{DoxyNote}{Note}
This function is thread safe 
\end{DoxyNote}
\begin{DoxySince}{Since}
1.\+10, but slower to use. 
\end{DoxySince}


References \mbox{\hyperlink{group__Eina__Main__Group_gada1beaf0b3e087deafd8608c1a47d34a}{eina\+\_\+main\+\_\+loop\+\_\+is()}}.



Referenced by \mbox{\hyperlink{group__Elm__Photocam__Group_gaa4cb6e360aab7307380ac92de4e04dd2}{elm\+\_\+photocam\+\_\+file\+\_\+set()}}.

\Hypertarget{group__Eina__Error__Group_ga7e6b1448d7730fc821736bda8964d739}\label{group__Eina__Error__Group_ga7e6b1448d7730fc821736bda8964d739} 
\index{Error@{Error}!eina\_error\_set@{eina\_error\_set}}
\index{eina\_error\_set@{eina\_error\_set}!Error@{Error}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_error\_set()}{eina\_error\_set()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void eina\+\_\+error\+\_\+set (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}}}]{err }\end{DoxyParamCaption})}



Sets the last error. 

This function sets the last error identifier. The last error can be retrieved by \doxylink{group__Eina__Error__Group_gaf1afffc7dc1e11101f47c5d14d9c5347}{eina\+\_\+error\+\_\+get()}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em err} & The error identifier\\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}
This is also used to clear previous errors, in which case {\ttfamily err} should be {\ttfamily 0} (\doxylink{group__Eina__Error__Group_ga637bff52ecef75ad46993950450347ae}{EINA\+\_\+\+ERROR\+\_\+\+NO\+\_\+\+ERROR}).

This function is thread safe 
\end{DoxyNote}
\begin{DoxySince}{Since}
1.\+10, but slower to use. 
\end{DoxySince}


References \mbox{\hyperlink{group__Eina__Main__Group_gada1beaf0b3e087deafd8608c1a47d34a}{eina\+\_\+main\+\_\+loop\+\_\+is()}}.



Referenced by \mbox{\hyperlink{Edje__Edit_8h_a946f2b8b4cb7367b6ac6d370398b7932}{edje\+\_\+edit\+\_\+state\+\_\+image\+\_\+border\+\_\+fill\+\_\+set()}}, \mbox{\hyperlink{Edje__Edit_8h_abdb67b795ba80db9bc718250e0318b1f}{edje\+\_\+edit\+\_\+state\+\_\+image\+\_\+border\+\_\+set()}}, \mbox{\hyperlink{Edje__Edit_8h_a82be84bc25f51f27fe65f7583aaebbdf}{edje\+\_\+edit\+\_\+state\+\_\+image\+\_\+set()}}, and \mbox{\hyperlink{Edje__Edit_8h_a0bbfaebe4d38fc30c2f826b5e30193bf}{edje\+\_\+edit\+\_\+state\+\_\+vector\+\_\+set()}}.

\Hypertarget{group__Eina__Error__Group_gac420af42486bcbb879c4be67eacc6c2a}\label{group__Eina__Error__Group_gac420af42486bcbb879c4be67eacc6c2a} 
\index{Error@{Error}!eina\_error\_msg\_get@{eina\_error\_msg\_get}}
\index{eina\_error\_msg\_get@{eina\_error\_msg\_get}!Error@{Error}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_error\_msg\_get()}{eina\_error\_msg\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} const char \texorpdfstring{$\ast$}{*} eina\+\_\+error\+\_\+msg\+\_\+get (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}}}]{error }\end{DoxyParamCaption})}



Returns the description of the given error number. 

This function returns the description of an error that has been registered by \doxylink{group__Eina__Error__Group_ga570f3e9a6807baf3f14168d205e5050a}{eina\+\_\+error\+\_\+msg\+\_\+register()}. If an incorrect error is given, then {\ttfamily NULL} is returned. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em error} & The error number \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The description of the error 
\end{DoxyReturn}


References \mbox{\hyperlink{group__Eina__Hash__Group_ga5e72d0c5397936512407ce8cd66e98d6}{eina\+\_\+hash\+\_\+add()}}, \mbox{\hyperlink{group__Eina__Hash__Group_ga6e9dc02a249e1fcdb64e38e7dc47afb3}{eina\+\_\+hash\+\_\+find()}}, \mbox{\hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729aebeef2702bf7645b094e48bc79705b99}{EINA\+\_\+\+LOCK\+\_\+\+SUCCEED}}, \mbox{\hyperlink{group__Eina__Stringshare__Group_ga4e3ce40744291c1fb8574e26883c0bf2}{eina\+\_\+stringshare\+\_\+add()}}, and \mbox{\hyperlink{group__Eina__String__Group_gae28caa0c42c4e76ae584f22bd3615723}{eina\+\_\+strlcpy()}}.



Referenced by \mbox{\hyperlink{group__Ecore__Con__Client__Group_ga89f79f973aeea2505078d87cb7b045b3}{ecore\+\_\+con\+\_\+client\+\_\+send()}}, \mbox{\hyperlink{group__Ecore__Con__Server__Group_gad01efce916804c31f6b2adcc6f607c6b}{ecore\+\_\+con\+\_\+server\+\_\+send()}}, \mbox{\hyperlink{group__Ecore__Con__Url__Group_ga97f9d4c4f9afcd699ab01ad9159c8141}{ecore\+\_\+con\+\_\+url\+\_\+ftp\+\_\+upload()}}, \mbox{\hyperlink{group__Ecore__Con__Url__Group_gaeb79adc8f07e54ad7a87a8c55de5ec72}{ecore\+\_\+con\+\_\+url\+\_\+get()}}, \mbox{\hyperlink{group__Ecore__Con__Url__Group_gaf9311b9adfbf7bbe9d0763cc1e9ed481}{ecore\+\_\+con\+\_\+url\+\_\+head()}}, \mbox{\hyperlink{group__Ecore__Con__Url__Group_ga8880afc509b97fbcb4db5ce98b4f4023}{ecore\+\_\+con\+\_\+url\+\_\+post()}}, \mbox{\hyperlink{group__Ecore__File__Group_ga2b26cf72e4c7370122359b45f866f73f}{ecore\+\_\+file\+\_\+download\+\_\+full()}}, \mbox{\hyperlink{group__Ecore__IPC__Client__Group_ga982c4fa7ecccfb5e89bb6d368a74fd2a}{ecore\+\_\+ipc\+\_\+client\+\_\+send()}}, \mbox{\hyperlink{group__Ecore__IPC__Server__Group_ga4314631af279786f7a3d3d043f96f8d4}{ecore\+\_\+ipc\+\_\+server\+\_\+add()}}, \mbox{\hyperlink{group__Ecore__IPC__Server__Group_gae7048746096a322f343f5499c8892c88}{ecore\+\_\+ipc\+\_\+server\+\_\+connect()}}, \mbox{\hyperlink{group__Ecore__IPC__Server__Group_ga1fb98acb3bcab778e52bf35f932a5afa}{ecore\+\_\+ipc\+\_\+server\+\_\+send()}}, and \mbox{\hyperlink{group__Eina__Promise_ga33c04f489c071e795839cbf6e60566ba}{eina\+\_\+promise\+\_\+reject()}}.

\Hypertarget{group__Eina__Error__Group_ga55ca37e4889513a4d5f02aba788d51bc}\label{group__Eina__Error__Group_ga55ca37e4889513a4d5f02aba788d51bc} 
\index{Error@{Error}!eina\_error\_find@{eina\_error\_find}}
\index{eina\_error\_find@{eina\_error\_find}!Error@{Error}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_error\_find()}{eina\_error\_find()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} eina\+\_\+error\+\_\+find (\begin{DoxyParamCaption}\item[{const char \texorpdfstring{$\ast$}{*}}]{msg }\end{DoxyParamCaption})}



Finds the \doxylink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error} corresponding to a message string. 

This function attempts to match {\ttfamily msg} with its corresponding \doxylink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error} value. If no such value is found, {\ttfamily 0} is returned.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em msg} & The error message string to match (NOT {\ttfamily NULL}) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The \doxylink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error} matching {\ttfamily msg}, otherwise {\ttfamily 0} on failure
\end{DoxyReturn}
\begin{DoxyNote}{Note}
this function only works for explicitly registered errors such as the messages given to \doxylink{group__Eina__Error__Group_ga570f3e9a6807baf3f14168d205e5050a}{eina\+\_\+error\+\_\+msg\+\_\+register()}, \doxylink{group__Eina__Error__Group_ga4a2be38f81f21dab8472ffb6bfd49ab7}{eina\+\_\+error\+\_\+msg\+\_\+static\+\_\+register()} or modified with \doxylink{group__Eina__Error__Group_ga7c88d2d4c5b4bff53c2a7ccbca69b33e}{eina\+\_\+error\+\_\+msg\+\_\+modify()}. 
\end{DoxyNote}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.

