From be8ef25a13d76bd886960c078ca5be4fc86d79a7 Mon Sep 17 00:00:00 2001 From: gustavo Date: Sat, 27 Aug 2016 23:54:40 +0200 Subject: [PATCH] stomp client, show JSON messages --- angularjs/stomp/src/stomp/app/example/example.controller.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/angularjs/stomp/src/stomp/app/example/example.controller.js b/angularjs/stomp/src/stomp/app/example/example.controller.js index 56b9d14..35c31c5 100644 --- a/angularjs/stomp/src/stomp/app/example/example.controller.js +++ b/angularjs/stomp/src/stomp/app/example/example.controller.js @@ -89,20 +89,12 @@ function errorCallback(error) { // display the error's message header: - if (error.headers) { - alert(error.headers.message); - } else { - alert(error); - } + alert('error call back: \n' + JSON.stringify(error, null, 4)); } function subscribeCallback(message) { // called when the client receives a STOMP message from the server - if (message.body) { - alert('got message with body ' + message.body); - } else { - alert('got empty message'); - } + alert('subscribe message: \n' + JSON.stringify(message, null, 4)); } function disconnectCallback() { -- 2.1.4