Commits

Anonymous committed 10e1d69

changing reason {amqp, ...} to #amqp_error{}

Comments (0)

Files changed (1)

src/bql_server.erl

 -export([start/0, start/2, stop/0, stop/1, start_link/0, send_command/4]).
 -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
 
+-include_lib("rabbit_common/include/rabbit.hrl").
+-include_lib("rabbit_common/include/rabbit_framing.hrl").
+
 -record(state, {}).
 
 start() ->
     case catch handle_message(Msg) of
         {reply, Content} ->
             {reply, Content, State};
-        {'EXIT', {amqp,access_refused,ErrorMsg,none}} ->
-            {reply, {error, ErrorMsg}, State};
+        {'EXIT', #amqp_error{name = access_refused, explanation = Expl}} ->
+            {reply, {error, Expl}, State};
         {'EXIT', Reason} ->
             {reply, {error, Reason}, State};
         Response ->