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


These functions provide error management for projects.  


\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{typedef int \hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\-\_\-\-Error}}\label{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}

\begin{DoxyCompactList}\small\item\em Error type. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} \hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\-\_\-\-Error} \hyperlink{group__Eina__Error__Group_gacd6991f1ce57f853ddb19f32bb4aad38}{eina\-\_\-error\-\_\-msg\-\_\-register} (const char $\ast$msg) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\-I\-N\-A\-\_\-\-A\-R\-G\-\_\-\-N\-O\-N\-N\-U\-L\-L}(1) \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\-I\-N\-A\-\_\-\-W\-A\-R\-N\-\_\-\-U\-N\-U\-S\-E\-D\-\_\-\-R\-E\-S\-U\-L\-T}
\begin{DoxyCompactList}\small\item\em Register a new error type. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} \hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\-\_\-\-Error} \hyperlink{group__Eina__Error__Group_ga004c7ceb7103cd5a698247ae3eb4578a}{eina\-\_\-error\-\_\-msg\-\_\-static\-\_\-register} (const char $\ast$msg) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\-I\-N\-A\-\_\-\-A\-R\-G\-\_\-\-N\-O\-N\-N\-U\-L\-L}(1) \hyperlink{group__Eina__Types__Group_ga4ba89e4b58eff707a6cf05ffe0cd4dea}{E\-I\-N\-A\-\_\-\-W\-A\-R\-N\-\_\-\-U\-N\-U\-S\-E\-D\-\_\-\-R\-E\-S\-U\-L\-T}
\begin{DoxyCompactList}\small\item\em Register a new error type, statically allocated message. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\-\_\-\-Bool} \hyperlink{group__Eina__Error__Group_ga79082e98c20137de7603f5697d581321}{eina\-\_\-error\-\_\-msg\-\_\-modify} (\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\-\_\-\-Error} error, const char $\ast$msg) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\-I\-N\-A\-\_\-\-A\-R\-G\-\_\-\-N\-O\-N\-N\-U\-L\-L}(2)
\begin{DoxyCompactList}\small\item\em Change the message of an already registered message. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} \hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\-\_\-\-Error} \hyperlink{group__Eina__Error__Group_gae0683831c4f8eebfdcb4f3cf1aef7052}{eina\-\_\-error\-\_\-get} (void)
\begin{DoxyCompactList}\small\item\em Return the last set error. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} void \hyperlink{group__Eina__Error__Group_ga80a8249f135460d4e07ebfe3f0a7bad1}{eina\-\_\-error\-\_\-set} (\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\-\_\-\-Error} err)
\begin{DoxyCompactList}\small\item\em Set the last error. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} const char $\ast$ \hyperlink{group__Eina__Error__Group_ga3402bc58a9f854391eb35fa7650edda5}{eina\-\_\-error\-\_\-msg\-\_\-get} (\hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\-\_\-\-Error} error) \hyperlink{group__Eina__Types__Group_ga4669a55a23089d0f9b70702ef05cea68}{E\-I\-N\-A\-\_\-\-P\-U\-R\-E}
\begin{DoxyCompactList}\small\item\em Return the description of the given an error number. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} \hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\-\_\-\-Error} \hyperlink{group__Eina__Error__Group_gaa1fe233ecb39f5f00bdd1f1a6f3c5a83}{eina\-\_\-error\-\_\-find} (const char $\ast$msg) \hyperlink{group__Eina__Types__Group_ga1a066aa3069f7e43279021cc1e378fac}{E\-I\-N\-A\-\_\-\-A\-R\-G\-\_\-\-N\-O\-N\-N\-U\-L\-L}(1) \hyperlink{group__Eina__Types__Group_ga4669a55a23089d0f9b70702ef05cea68}{E\-I\-N\-A\-\_\-\-P\-U\-R\-E}
\begin{DoxyCompactList}\small\item\em Find the \hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\-\_\-\-Error} corresponding to a message string. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Eina__Error__Group_gad5e9a56fa33593d588df95bf6413964a}{\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} \hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\-\_\-\-Error} \hyperlink{group__Eina__Error__Group_gad5e9a56fa33593d588df95bf6413964a}{E\-I\-N\-A\-\_\-\-E\-R\-R\-O\-R\-\_\-\-O\-U\-T\-\_\-\-O\-F\-\_\-\-M\-E\-M\-O\-R\-Y}}\label{group__Eina__Error__Group_gad5e9a56fa33593d588df95bf6413964a}

\begin{DoxyCompactList}\small\item\em Error identifier corresponding to a lack of memory. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
These functions 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. Similar to lib\-C's {\ttfamily errno} and strerror() facilities, this is extensible and recommended for other libraries and applications.

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

\subsection{Function Documentation}
\hypertarget{group__Eina__Error__Group_gacd6991f1ce57f853ddb19f32bb4aad38}{\index{Error@{Error}!eina\-\_\-error\-\_\-msg\-\_\-register@{eina\-\_\-error\-\_\-msg\-\_\-register}}
\index{eina\-\_\-error\-\_\-msg\-\_\-register@{eina\-\_\-error\-\_\-msg\-\_\-register}!Error@{Error}}
\subsubsection[{eina\-\_\-error\-\_\-msg\-\_\-register}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} {\bf Eina\-\_\-\-Error} eina\-\_\-error\-\_\-msg\-\_\-register (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{msg}
\end{DoxyParamCaption}
)}}\label{group__Eina__Error__Group_gacd6991f1ce57f853ddb19f32bb4aad38}


Register a new error type. 


\begin{DoxyParams}{Parameters}
{\em msg} & The description of the error. It will be duplicated using \hyperlink{group__Eina__Stringshare__Group_gac7a3f073cafb7af63b2c7cc2eabd1c1f}{eina\-\_\-stringshare\-\_\-add()}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The unique number identifier for this error.
\end{DoxyReturn}
This function stores in a list the error message described by {\ttfamily msg}. The returned value is a unique identifier greater or equal than 1. The description can be retrieve later by passing to \hyperlink{group__Eina__Error__Group_ga3402bc58a9f854391eb35fa7650edda5}{eina\-\_\-error\-\_\-msg\-\_\-get()} the returned value.

\begin{DoxySeeAlso}{See Also}
\hyperlink{group__Eina__Error__Group_ga004c7ceb7103cd5a698247ae3eb4578a}{eina\-\_\-error\-\_\-msg\-\_\-static\-\_\-register()} 
\end{DoxySeeAlso}


References eina\-\_\-stringshare\-\_\-add(), and E\-I\-N\-A\-\_\-\-T\-R\-U\-E.

\hypertarget{group__Eina__Error__Group_ga004c7ceb7103cd5a698247ae3eb4578a}{\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}}
\subsubsection[{eina\-\_\-error\-\_\-msg\-\_\-static\-\_\-register}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} {\bf Eina\-\_\-\-Error} eina\-\_\-error\-\_\-msg\-\_\-static\-\_\-register (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{msg}
\end{DoxyParamCaption}
)}}\label{group__Eina__Error__Group_ga004c7ceb7103cd5a698247ae3eb4578a}


Register a new error type, statically allocated message. 


\begin{DoxyParams}{Parameters}
{\em msg} & The description of the error. This string will not be duplicated and thus the given pointer should live during usage of eina\-\_\-error. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The unique number identifier for this error.
\end{DoxyReturn}
This function stores in a list the error message described by {\ttfamily msg}. The returned value is a unique identifier greater or equal than 1. The description can be retrieve later by passing to \hyperlink{group__Eina__Error__Group_ga3402bc58a9f854391eb35fa7650edda5}{eina\-\_\-error\-\_\-msg\-\_\-get()} the returned value.

\begin{DoxySeeAlso}{See Also}
\hyperlink{group__Eina__Error__Group_gacd6991f1ce57f853ddb19f32bb4aad38}{eina\-\_\-error\-\_\-msg\-\_\-register()} 
\end{DoxySeeAlso}


References E\-I\-N\-A\-\_\-\-F\-A\-L\-S\-E.

\hypertarget{group__Eina__Error__Group_ga79082e98c20137de7603f5697d581321}{\index{Error@{Error}!eina\-\_\-error\-\_\-msg\-\_\-modify@{eina\-\_\-error\-\_\-msg\-\_\-modify}}
\index{eina\-\_\-error\-\_\-msg\-\_\-modify@{eina\-\_\-error\-\_\-msg\-\_\-modify}!Error@{Error}}
\subsubsection[{eina\-\_\-error\-\_\-msg\-\_\-modify}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} {\bf Eina\-\_\-\-Bool} eina\-\_\-error\-\_\-msg\-\_\-modify (
\begin{DoxyParamCaption}
\item[{{\bf Eina\-\_\-\-Error}}]{error, }
\item[{const char $\ast$}]{msg}
\end{DoxyParamCaption}
)}}\label{group__Eina__Error__Group_ga79082e98c20137de7603f5697d581321}


Change the message of an already registered message. 


\begin{DoxyParams}{Parameters}
{\em error} & The Eina\-\_\-\-Error to change the message of \\
\hline
{\em msg} & The description of the error. This string will be duplicated only if the error was registered with \hyperlink{group__Eina__Error__Group_gacd6991f1ce57f853ddb19f32bb4aad38}{eina\-\_\-error\-\_\-msg\-\_\-register} otherwise it must remain intact for the duration. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\-I\-N\-A\-\_\-\-T\-R\-U\-E} if successful, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\-I\-N\-A\-\_\-\-F\-A\-L\-S\-E} on error.
\end{DoxyReturn}
This function modifies the message associated with {\ttfamily error} and changes it to {\ttfamily msg}. If the error was previously registered by \hyperlink{group__Eina__Error__Group_ga004c7ceb7103cd5a698247ae3eb4578a}{eina\-\_\-error\-\_\-msg\-\_\-static\-\_\-register} then the string will not be duplicated, otherwise the previous message will be unrefed and {\ttfamily msg} copied.

\begin{DoxySeeAlso}{See Also}
\hyperlink{group__Eina__Error__Group_gacd6991f1ce57f853ddb19f32bb4aad38}{eina\-\_\-error\-\_\-msg\-\_\-register()} 
\end{DoxySeeAlso}


References E\-I\-N\-A\-\_\-\-F\-A\-L\-S\-E, eina\-\_\-stringshare\-\_\-add(), eina\-\_\-stringshare\-\_\-del(), and E\-I\-N\-A\-\_\-\-T\-R\-U\-E.

\hypertarget{group__Eina__Error__Group_gae0683831c4f8eebfdcb4f3cf1aef7052}{\index{Error@{Error}!eina\-\_\-error\-\_\-get@{eina\-\_\-error\-\_\-get}}
\index{eina\-\_\-error\-\_\-get@{eina\-\_\-error\-\_\-get}!Error@{Error}}
\subsubsection[{eina\-\_\-error\-\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} {\bf Eina\-\_\-\-Error} eina\-\_\-error\-\_\-get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Eina__Error__Group_gae0683831c4f8eebfdcb4f3cf1aef7052}


Return the last set error. 

\begin{DoxyReturn}{Returns}
The last error.
\end{DoxyReturn}
This function returns the last error set by \hyperlink{group__Eina__Error__Group_ga80a8249f135460d4e07ebfe3f0a7bad1}{eina\-\_\-error\-\_\-set()}. The description of the message is returned by \hyperlink{group__Eina__Error__Group_ga3402bc58a9f854391eb35fa7650edda5}{eina\-\_\-error\-\_\-msg\-\_\-get()}. \hypertarget{group__Eina__Error__Group_ga80a8249f135460d4e07ebfe3f0a7bad1}{\index{Error@{Error}!eina\-\_\-error\-\_\-set@{eina\-\_\-error\-\_\-set}}
\index{eina\-\_\-error\-\_\-set@{eina\-\_\-error\-\_\-set}!Error@{Error}}
\subsubsection[{eina\-\_\-error\-\_\-set}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} void eina\-\_\-error\-\_\-set (
\begin{DoxyParamCaption}
\item[{{\bf Eina\-\_\-\-Error}}]{err}
\end{DoxyParamCaption}
)}}\label{group__Eina__Error__Group_ga80a8249f135460d4e07ebfe3f0a7bad1}


Set the last error. 


\begin{DoxyParams}{Parameters}
{\em err} & The error identifier.\\
\hline
\end{DoxyParams}
This function sets the last error identifier. The last error can be retrieved with \hyperlink{group__Eina__Error__Group_gae0683831c4f8eebfdcb4f3cf1aef7052}{eina\-\_\-error\-\_\-get()}.

\begin{DoxyNote}{Note}
This is also used to clear previous errors, in that case {\ttfamily err} should be {\ttfamily 0}. 
\end{DoxyNote}


Referenced by edje\-\_\-edit\-\_\-program\-\_\-transition\-\_\-value1\-\_\-get(), edje\-\_\-edit\-\_\-program\-\_\-transition\-\_\-value1\-\_\-set(), edje\-\_\-edit\-\_\-program\-\_\-transition\-\_\-value2\-\_\-get(), edje\-\_\-edit\-\_\-program\-\_\-transition\-\_\-value2\-\_\-set(), edje\-\_\-edit\-\_\-state\-\_\-image\-\_\-border\-\_\-fill\-\_\-set(), edje\-\_\-edit\-\_\-state\-\_\-image\-\_\-border\-\_\-set(), and edje\-\_\-edit\-\_\-state\-\_\-image\-\_\-set().

\hypertarget{group__Eina__Error__Group_ga3402bc58a9f854391eb35fa7650edda5}{\index{Error@{Error}!eina\-\_\-error\-\_\-msg\-\_\-get@{eina\-\_\-error\-\_\-msg\-\_\-get}}
\index{eina\-\_\-error\-\_\-msg\-\_\-get@{eina\-\_\-error\-\_\-msg\-\_\-get}!Error@{Error}}
\subsubsection[{eina\-\_\-error\-\_\-msg\-\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} const char$\ast$ eina\-\_\-error\-\_\-msg\-\_\-get (
\begin{DoxyParamCaption}
\item[{{\bf Eina\-\_\-\-Error}}]{error}
\end{DoxyParamCaption}
)}}\label{group__Eina__Error__Group_ga3402bc58a9f854391eb35fa7650edda5}


Return the description of the given an error number. 


\begin{DoxyParams}{Parameters}
{\em error} & The error number. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The description of the error.
\end{DoxyReturn}
This function returns the description of an error that has been registered with \hyperlink{group__Eina__Error__Group_gacd6991f1ce57f853ddb19f32bb4aad38}{eina\-\_\-error\-\_\-msg\-\_\-register()}. If an incorrect error is given, then {\ttfamily N\-U\-L\-L} is returned. \hypertarget{group__Eina__Error__Group_gaa1fe233ecb39f5f00bdd1f1a6f3c5a83}{\index{Error@{Error}!eina\-\_\-error\-\_\-find@{eina\-\_\-error\-\_\-find}}
\index{eina\-\_\-error\-\_\-find@{eina\-\_\-error\-\_\-find}!Error@{Error}}
\subsubsection[{eina\-\_\-error\-\_\-find}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} {\bf Eina\-\_\-\-Error} eina\-\_\-error\-\_\-find (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{msg}
\end{DoxyParamCaption}
)}}\label{group__Eina__Error__Group_gaa1fe233ecb39f5f00bdd1f1a6f3c5a83}


Find the \hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\-\_\-\-Error} corresponding to a message string. 


\begin{DoxyParams}{Parameters}
{\em msg} & The error message string to match (N\-O\-T {\ttfamily N\-U\-L\-L}) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The \hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\-\_\-\-Error} matching {\ttfamily msg}, or 0 on failure This function attempts to match {\ttfamily msg} with its corresponding \hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\-\_\-\-Error} value. If no such value is found, 0 is returned. 
\end{DoxyReturn}
