\hypertarget{group__Eina__Error__Group}{}\doxysection{Error}
\label{group__Eina__Error__Group}\index{Error@{Error}}


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


\doxysubsection*{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}
\doxysubsection*{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}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} \mbox{\hyperlink{group__Eina__Error__Group_ga39e79c4918d5e385404c79df751888d2}{eina\+\_\+error\+\_\+msg\+\_\+register}} (const char $\ast$msg)
\begin{DoxyCompactList}\small\item\em Registers a new error type. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} \mbox{\hyperlink{group__Eina__Error__Group_ga4e67b3ce519e086fad1962c0499201b2}{eina\+\_\+error\+\_\+msg\+\_\+static\+\_\+register}} (const char $\ast$msg)
\begin{DoxyCompactList}\small\item\em Registers a new error type, statically allocated message. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Error__Group_ga243647b0fd8a4d03d093c391afe37ae8}{eina\+\_\+error\+\_\+msg\+\_\+modify}} (\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} error, const char $\ast$msg)
\begin{DoxyCompactList}\small\item\em Changes the message of an already registered message. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} \mbox{\hyperlink{group__Eina__Error__Group_ga010057192a0735339e46b6f8f69b7345}{eina\+\_\+error\+\_\+get}} (void)
\begin{DoxyCompactList}\small\item\em Returns the last set error. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Eina__Error__Group_gad1a7035e62df4f3f57c690bb1159dc01}{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 
const char $\ast$ \mbox{\hyperlink{group__Eina__Error__Group_ga54953b3f118ad981cb27ef3ac3d77b17}{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__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} \mbox{\hyperlink{group__Eina__Error__Group_gafca6b1e0296f3f7aaa0de6bb3d4d230f}{eina\+\_\+error\+\_\+find}} (const char $\ast$msg)
\begin{DoxyCompactList}\small\item\em Finds the \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} corresponding to a message string. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Error__Group_ga179bed9600ae2ae59dd03237365e6672}\label{group__Eina__Error__Group_ga179bed9600ae2ae59dd03237365e6672}} 
\mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} EINA\+\_\+\+ERROR\+\_\+\+OUT\+\_\+\+OF\+\_\+\+MEMORY {\bfseries EINA\+\_\+\+DEPRECATED}
\end{DoxyCompactItemize}


\doxysubsection{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 \mbox{\hyperlink{group__Eina__Error__Group_ga54953b3f118ad981cb27ef3ac3d77b17}{eina\+\_\+error\+\_\+msg\+\_\+get()}}

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

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

\doxysubsection{Macro Definition Documentation}
\mbox{\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}}
\doxysubsubsection{\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 \char`\"{}0\char`\"{}. 

\doxysubsection{Typedef Documentation}
\mbox{\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}}
\doxysubsubsection{\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 \mbox{\hyperlink{group__Eina__Error__Group_ga39e79c4918d5e385404c79df751888d2}{eina\+\_\+error\+\_\+msg\+\_\+register()}}, \mbox{\hyperlink{group__Eina__Error__Group_ga4e67b3ce519e086fad1962c0499201b2}{eina\+\_\+error\+\_\+msg\+\_\+static\+\_\+register()}} or those inherited from the system\textquotesingle{}s {\ttfamily errno.\+h} such as {\ttfamily ENOMEM}. \mbox{\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}}
\doxysubsubsection{\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. 

\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Eina__Error__Group_ga39e79c4918d5e385404c79df751888d2}\label{group__Eina__Error__Group_ga39e79c4918d5e385404c79df751888d2}} 
\index{Error@{Error}!eina\_error\_msg\_register@{eina\_error\_msg\_register}}
\index{eina\_error\_msg\_register@{eina\_error\_msg\_register}!Error@{Error}}
\doxysubsubsection{\texorpdfstring{eina\_error\_msg\_register()}{eina\_error\_msg\_register()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} eina\+\_\+error\+\_\+msg\+\_\+register (\begin{DoxyParamCaption}\item[{const char $\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 \mbox{\hyperlink{group__Eina__Error__Group_ga54953b3f118ad981cb27ef3ac3d77b17}{eina\+\_\+error\+\_\+msg\+\_\+get()}}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em msg} & The description of the error ~\newline
 It is duplicated using \mbox{\hyperlink{group__Eina__Stringshare__Group_ga5293082680141132ffcacc28866ef0ef}{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}
\mbox{\hyperlink{group__Eina__Error__Group_ga4e67b3ce519e086fad1962c0499201b2}{eina\+\_\+error\+\_\+msg\+\_\+static\+\_\+register()}} 
\end{DoxySeeAlso}


References EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL, eina\+\_\+stringshare\+\_\+add(), and EINA\+\_\+\+TRUE.



Referenced by ecore\+\_\+evas\+\_\+init().

\mbox{\Hypertarget{group__Eina__Error__Group_ga4e67b3ce519e086fad1962c0499201b2}\label{group__Eina__Error__Group_ga4e67b3ce519e086fad1962c0499201b2}} 
\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}}
\doxysubsubsection{\texorpdfstring{eina\_error\_msg\_static\_register()}{eina\_error\_msg\_static\_register()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error}} eina\+\_\+error\+\_\+msg\+\_\+static\+\_\+register (\begin{DoxyParamCaption}\item[{const char $\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 \mbox{\hyperlink{group__Eina__Error__Group_ga54953b3f118ad981cb27ef3ac3d77b17}{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}
\mbox{\hyperlink{group__Eina__Error__Group_ga39e79c4918d5e385404c79df751888d2}{eina\+\_\+error\+\_\+msg\+\_\+register()}} 
\end{DoxySeeAlso}


References EINA\+\_\+\+FALSE, and EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL.



Referenced by eina\+\_\+init().

\mbox{\Hypertarget{group__Eina__Error__Group_ga243647b0fd8a4d03d093c391afe37ae8}\label{group__Eina__Error__Group_ga243647b0fd8a4d03d093c391afe37ae8}} 
\index{Error@{Error}!eina\_error\_msg\_modify@{eina\_error\_msg\_modify}}
\index{eina\_error\_msg\_modify@{eina\_error\_msg\_modify}!Error@{Error}}
\doxysubsubsection{\texorpdfstring{eina\_error\_msg\_modify()}{eina\_error\_msg\_modify()}}
{\footnotesize\ttfamily \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 $\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 \mbox{\hyperlink{group__Eina__Error__Group_ga4e67b3ce519e086fad1962c0499201b2}{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 \mbox{\hyperlink{group__Eina__Error__Group_ga39e79c4918d5e385404c79df751888d2}{eina\+\_\+error\+\_\+msg\+\_\+register}}, otherwise it must remain intact for the duration. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} if successful, otherwise \mbox{\hyperlink{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}
\mbox{\hyperlink{group__Eina__Error__Group_ga39e79c4918d5e385404c79df751888d2}{eina\+\_\+error\+\_\+msg\+\_\+register()}} 
\end{DoxySeeAlso}


References EINA\+\_\+\+FALSE, EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+RETURN\+\_\+\+VAL, EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL, eina\+\_\+stringshare\+\_\+add(), eina\+\_\+stringshare\+\_\+del(), and EINA\+\_\+\+TRUE.

\mbox{\Hypertarget{group__Eina__Error__Group_ga010057192a0735339e46b6f8f69b7345}\label{group__Eina__Error__Group_ga010057192a0735339e46b6f8f69b7345}} 
\index{Error@{Error}!eina\_error\_get@{eina\_error\_get}}
\index{eina\_error\_get@{eina\_error\_get}!Error@{Error}}
\doxysubsubsection{\texorpdfstring{eina\_error\_get()}{eina\_error\_get()}}
{\footnotesize\ttfamily \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 \mbox{\hyperlink{group__Eina__Error__Group_gad1a7035e62df4f3f57c690bb1159dc01}{eina\+\_\+error\+\_\+set()}}. The description of the message is returned by \mbox{\hyperlink{group__Eina__Error__Group_ga54953b3f118ad981cb27ef3ac3d77b17}{eina\+\_\+error\+\_\+msg\+\_\+get()}}.

\begin{DoxyReturn}{Returns}
The last error or 0 (\mbox{\hyperlink{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 eina\+\_\+main\+\_\+loop\+\_\+is(), and eina\+\_\+tls\+\_\+get().



Referenced by elm\+\_\+photocam\+\_\+file\+\_\+set().

\mbox{\Hypertarget{group__Eina__Error__Group_gad1a7035e62df4f3f57c690bb1159dc01}\label{group__Eina__Error__Group_gad1a7035e62df4f3f57c690bb1159dc01}} 
\index{Error@{Error}!eina\_error\_set@{eina\_error\_set}}
\index{eina\_error\_set@{eina\_error\_set}!Error@{Error}}
\doxysubsubsection{\texorpdfstring{eina\_error\_set()}{eina\_error\_set()}}
{\footnotesize\ttfamily 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 \mbox{\hyperlink{group__Eina__Error__Group_ga010057192a0735339e46b6f8f69b7345}{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} (\mbox{\hyperlink{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 eina\+\_\+main\+\_\+loop\+\_\+is(), and eina\+\_\+tls\+\_\+set().



Referenced by edje\+\_\+edit\+\_\+state\+\_\+image\+\_\+border\+\_\+fill\+\_\+set(), edje\+\_\+edit\+\_\+state\+\_\+image\+\_\+border\+\_\+set(), edje\+\_\+edit\+\_\+state\+\_\+image\+\_\+set(), and edje\+\_\+edit\+\_\+state\+\_\+vector\+\_\+set().

\mbox{\Hypertarget{group__Eina__Error__Group_ga54953b3f118ad981cb27ef3ac3d77b17}\label{group__Eina__Error__Group_ga54953b3f118ad981cb27ef3ac3d77b17}} 
\index{Error@{Error}!eina\_error\_msg\_get@{eina\_error\_msg\_get}}
\index{eina\_error\_msg\_get@{eina\_error\_msg\_get}!Error@{Error}}
\doxysubsubsection{\texorpdfstring{eina\_error\_msg\_get()}{eina\_error\_msg\_get()}}
{\footnotesize\ttfamily const char$\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 \mbox{\hyperlink{group__Eina__Error__Group_ga39e79c4918d5e385404c79df751888d2}{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 eina\+\_\+hash\+\_\+add(), eina\+\_\+hash\+\_\+find(), EINA\+\_\+\+LOCK\+\_\+\+SUCCEED, eina\+\_\+spinlock\+\_\+release(), eina\+\_\+spinlock\+\_\+take(), eina\+\_\+stringshare\+\_\+add(), and eina\+\_\+strlcpy().



Referenced by ecore\+\_\+con\+\_\+client\+\_\+send(), ecore\+\_\+con\+\_\+server\+\_\+send(), and eina\+\_\+promise\+\_\+reject().

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



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

This function attempts to match {\ttfamily msg} with its corresponding \mbox{\hyperlink{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 \mbox{\hyperlink{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 \mbox{\hyperlink{group__Eina__Error__Group_ga39e79c4918d5e385404c79df751888d2}{eina\+\_\+error\+\_\+msg\+\_\+register()}}, \mbox{\hyperlink{group__Eina__Error__Group_ga4e67b3ce519e086fad1962c0499201b2}{eina\+\_\+error\+\_\+msg\+\_\+static\+\_\+register()}} or modified with \mbox{\hyperlink{group__Eina__Error__Group_ga243647b0fd8a4d03d093c391afe37ae8}{eina\+\_\+error\+\_\+msg\+\_\+modify()}}. 
\end{DoxyNote}


References EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL.

