Here an example using mdframed whereby the symbols are taken from the package dingbat Instead of the symbols you can use every picture.
\documentclass{report}
\usepackage[framemethod=tikz]{mdframed}
\usetikzlibrary{calc}
\usepackage{kantlipsum}
\usepackage{dingbat}%\eye and \leftpointright
\newcounter{error}[chapter]
\renewcommand*\theerror{\thechapter.\arabic{error}}
\tikzset{
errorsymbol/.style={%
rectangle,draw=blue,
,scale=2,overlay}}
\tikzset{
lampsymbol/.style={%
,scale=2,overlay}}
\newmdenv[hidealllines=true,backgroundcolor=blue!5,%
frametitle={\stepcounter{error}Comman~Programming~Error~\theerror},
frametitlefont=\color{blue!80!black}\bfseries,
skipabove=\topsep,skipbelow=\topsep,nobreak,
leftmargin=.3cm,rightmargin=.3cm, innerleftmargin=2cm,
singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,0)+0.5*(2,\y1)$) node[errorsymbol] {\eye};},%
]{error}
\newmdenv[nobreak,middlelinewidth=.8pt,
frametitlefont=\bfseries,
leftmargin=.3cm,rightmargin=.3cm, innerleftmargin=2cm,
skipabove=\topsep,skipbelow=\topsep,
singleextra={\path let \p1=(P), \p2=(O) in ($(\x2,0)+0.5*(2,\y1)$) node[ lampsymbol] {\leftpointright};
\draw[line width=.8pt,white,] ($(O|-P)+(.2cm,0)$) -- ($(P)-(.2cm,0)$);
\draw[line width=.8pt,white,] ($(O)+(.2cm,0)$) -- ($(P|-O)-(.2cm,0)$);
},%
]{lamp}
\begin{document}
\begin{error}
Use only uppercase letters in the names of enumeration constants to make these
constants stand out in a program and to indicate that enumeration constants
are variables.
\end{error}
\begin{lamp}[frametitle={Web addresses in texts}]
Use only uppercase letters in the names of enumeration constants to make these
constants stand out in a program and to indicate that enumeration constants
are variables.
\end{lamp}
\end{document}
