\label{doc_dev_error-message_md_md_doc_dev_error_message}%
\Hypertarget{doc_dev_error-message_md_md_doc_dev_error_message}%
 Elektra has a lot of developers and hence the error messages vary in how they are written. This guideline should unify the message format so that users will get consistent error messages.


\begin{DoxyItemize}
\item All error messages start with a capital letter. Reword sentences that theoretically require a lowercase first letter such as regex patterns, method names or variable strings (\char`\"{}\%s\char`\"{}-\/strings) to have a normal word at the start of the sentence. Also surround method names with single quotes. Example\+: {\ttfamily \mbox{\hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()}} not supported} should be changed to `Method \textquotesingle{}\mbox{\hyperlink{group__kdb_ga11436b058408f83d303ca5e996832bcf}{kdb\+Set()}}' is not supported\`{}
\item Always report all information which could be useful for the user. For some error types, templates are provided to not forget something. (eg. keys, files, errno, etc.)
\item If the error reason is in beneath a variable string (such as {\ttfamily errno} or a caught exception), write {\ttfamily \char`\"{}\+Reason\+: \%s\char`\"{}, variable\+\_\+as\+\_\+string} at the end of the error message. Also end the preceding sentence with a dot. Example\+: {\ttfamily \char`\"{}\+XY failed. Reason\+: \%s\char`\"{}, exception.\+what()}.
\item The last sentence (or single sentence of your message if you just provide one) must not end with a dot. This should encourage users to continue reading if other messages appear.
\item If your message has multiple sentences, separate them with dots and start with a capital letter like you would do in the normal English language.
\item Short but many sentences are preferable over long ones.
\item Use abbreviations and acronyms with care. Not everybody will know them. You can write them in brackets though. (eg. {\ttfamily No Byte Order Mark (BOM) found} instead of {\ttfamily No BOM found}. But {\ttfamily XML does not support feature xy} is fine).
\item Never use exclamation marks at the end of sentences.
\item If it is unclear where embedded strings in error messages start and end (\char`\"{}\%s\char`\"{}-\/strings), surround them by single quotes \textquotesingle{}. Sentences containing a variable string and end with {\ttfamily Reason\+: s} do not need extra quotes because it is clear where they start and end.
\end{DoxyItemize}\hypertarget{doc_dev_error-message_md_autotoc_md2164}{}\doxysection{Examples}\label{doc_dev_error-message_md_autotoc_md2164}
Actual reason might be in errno or an exception


\begin{DoxyItemize}
\item {\ttfamily \char`\"{}\+The configuration file \%s contains invalid syntax at line \%s. Reason\+: \%s\char`\"{}, file.\+path(), line, e.\+what()} Result\+: {\ttfamily The configuration file /etc/conf/file.csv contains invalid syntax at line 6. Reason\+: Missing column}
\item {\ttfamily \char`\"{}\+Could not rename file \%s. Reason\+: \%s\char`\"{} file.\+path(), e.\+what()} Result\+: {\ttfamily Could not rename file /etc/conf/file.yml. Reason\+: File is not existent}
\item `\char`\"{}\+The key \%s contained the value '\%s\textquotesingle{}, but only \textquotesingle{}unmounted\textquotesingle{} is supported for non-\/global clauses at the moment\char`\"{}, key\+Name(key), key\+String(key){\ttfamily  Result\+:}The key user\+:/my/key contained the value \textquotesingle{}mounted\textquotesingle{}, but only \textquotesingle{}unmounted\textquotesingle{} is supported for non-\/global clauses at the moment\`{} 
\end{DoxyItemize}