\label{doc_decisions_1_problem_clear_error_semantics_md_md_doc_decisions_1_problem_clear_error_semantics}%
\Hypertarget{doc_decisions_1_problem_clear_error_semantics_md_md_doc_decisions_1_problem_clear_error_semantics}%
 \hypertarget{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1926}{}\doxysection{Problem}\label{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1926}
While we have a classification of errors and warnings, it remains unclear when plugins actually should emit errors and warnings.\hypertarget{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1927}{}\doxysection{Constraints}\label{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1927}

\begin{DoxyItemize}
\item Should not be contradicting to specified behavior in \mbox{\hyperlink{doc_tutorials_storage-plugins_md}{storage plugin tutorial}}.
\end{DoxyItemize}\hypertarget{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1928}{}\doxysection{Assumptions}\label{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1928}

\begin{DoxyItemize}
\item Users want a uniform behavior within Elektra, so plugins must behave uniformly.
\end{DoxyItemize}\hypertarget{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1929}{}\doxysection{Considered Alternatives}\label{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1929}

\begin{DoxyItemize}
\item freedom to plugin writers
\item strict rules and conformance tests for plugins
\end{DoxyItemize}\hypertarget{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1930}{}\doxysection{Decision}\label{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1930}
Provide guidelines in the form as tutorials, covering\+:


\begin{DoxyItemize}
\item prefer errors to warnings
\item that any not understood metadata (e.\+g. types), should lead to an error
\item that wrong specifications, like {\ttfamily kdb meta-\/set /tests/ipaddr/ipv4 check/ipaddr ipv8} should be rejected
\item if the value does not confirm {\bfseries{exactly}} to the specified type, an error should be emitted (e.\+g. only {\ttfamily 0} or {\ttfamily 1} as boolean)
\item anything else that is beyond the capabilities of a plugin (not implemented), should lead to an error
\end{DoxyItemize}

Violations against these guidelines can be reported as bug and then either\+:


\begin{DoxyItemize}
\item the bug gets fixed
\item the plugin get a worse {\ttfamily infos/status} but still get shipped with 1.\+0
\item the plugin gets removed
\end{DoxyItemize}\hypertarget{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1931}{}\doxysection{Rationale}\label{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1931}
It is easier for developers if there are clear expectations on how a plugin should behave. And it is much easier for overall Elektra if there is more consistency.\hypertarget{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1932}{}\doxysection{Implications}\label{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1932}

\begin{DoxyItemize}
\item more checks\&errors in storage plugins are needed
\end{DoxyItemize}\hypertarget{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1933}{}\doxysection{Related Decisions}\label{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1933}

\begin{DoxyItemize}
\item \mbox{\hyperlink{doc_decisions_1_problem_clear_spec_metadata_md}{Metadata in Spec Namespace}}
\item \mbox{\hyperlink{doc_decisions_4_decided_capabilities_md}{Capabilities}}
\item \mbox{\hyperlink{doc_decisions_5_partially_implemented_boolean_md}{Boolean}}
\end{DoxyItemize}\hypertarget{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1934}{}\doxysection{Notes}\label{doc_decisions_1_problem_clear_error_semantics_md_autotoc_md1934}

\begin{DoxyItemize}
\item \href{https://issues.libelektra.org/1511}{\texttt{ Issue \#1511}} 
\end{DoxyItemize}