IT. Expert System.

PHP

Gets the last stomp error


Stomp::error

stomp_error

(PECL stomp >= 0.1.0)

Stomp::error -- stomp_errorGets the last stomp error

Description

Object oriented style (method):

public string Stomp::error ( void )

Procedural style:

string stomp_error ( resource $link )

Gets the last stomp error.

Parameters

link

Procedural style only: The stomp link identifier returned by stomp_connect().

Return Values

Returns an error string or FALSE if no error occurred.

Examples

Example #1 Object oriented style

<?php

/* connection */
try {
    
$stomp = new Stomp('tcp://localhost:61613');
} catch(
StompException $e) {
    die(
'Connection failed: ' $e->getMessage());
}

var_dump($stomp->error());

if (!
$stomp->abort('unknown-transaction', array('receipt' => 'foo'))) {
    
var_dump($stomp->error());
}

/* close connection */
unset($stomp);

?>

The above example will output something similar to:

 bool(false) string(43) "Invalid transaction id: unknown-transaction" 

Example #2 Procedural style

<?php

/* connection */
$link stomp_connect('ssl://localhost:61612');

/* check connection */
if (!$link) {
    die(
'Connection failed: ' stomp_connect_error());
}

var_dump(stomp_error($link));

if (!
stomp_abort($link'unknown-transaction', array('receipt' => 'foo'))) {
    
var_dump(stomp_error($link));
}

/* close connection */
stomp_close($link);

?>

The above example will output something similar to:

 bool(false) string(43) "Invalid transaction id: unknown-transaction" 



Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 621 / 158794380. Delta: 0.03645 с