     private function handleNotification(msg:NotificationResponse):void {
         dispatchEvent(new NotificationEvent(msg.condition, msg.notifierPid));
     }
+}
+
+class NoticeHandler extends AbstractFEBEMessageHandler {
+
+    public function NoticeHandler(target:IEventDispatcher) {
+        super(target);
+        _handlerMethods[NoticeResponse] = handleNotice;
+        _handlerMethods[ErrorResponse] = handleNotice
+    }
+
+    private function handleNotice(msg:ResponseMessageBase):void {
+        dispatchEvent(new NoticeEvent(msg is ErrorResponse ? NoticeEvent.ERROR : NoticeEvent.NOTICE, msg.fields));
+    }
 }
            _msgDispatcher = dispatcher;
            var authHandler:IFEBEMessageHandler = new AuthenticationHandler(dispatcher);
            authHandler.addEventListener(AuthenticationHandler.AUTHENTICATED, handleAuth);
            _handlers.push(authHandler);
            _broker.send(new StartupMessage(_params));
        }

        private function handleAuth(e:Event):void {
        	_connecting = false;
        	_connected = true;
        	//_queryHandler = new QueryMessageHandler(_msgDispatcher);
        	_handlers = [ /* query, rfq (?), notice/error, notification */ ];
        	// rfq probably does not need to be its own handler with its own state--we
        	// can directly add an event handler to the broker.
        }
		


import org.postgresql.febe.ProtocolError;
import flash.events.Event;
import org.postgresql.febe.TransactionStatus;
import org.postgresql.febe.message.NoticeResponse;
import org.postgresql.febe.message.ErrorResponse;
import org.postgresql.febe.event.NoticeEvent;
import org.postgresql.febe.message.ResponseMessageBase;

class NotificationHandler extends AbstractFEBEMessageHandler {

