try {
ServiceReference ref = m_context.getServiceReference(ErrorHandler.class.getName());
if (ref != null) {
ErrorHandler handler = (ErrorHandler) m_context.getService(ref);
if (level == ERROR) {
handler.onError(m_instance, msg, error);
} else if (level == WARNING) {
handler.onWarning(m_instance, msg, error);
} // The others case are not supported
m_context.ungetService(ref);
return;