[Freeswitch-svn] [commit] r5877 - freeswitch/trunk/scripts/socket/FreeSWITCH
Freeswitch SVN
xachen at freeswitch.org
Mon Oct 15 13:16:45 EDT 2007
Author: xachen
Date: Mon Oct 15 13:16:45 2007
New Revision: 5877
Modified:
freeswitch/trunk/scripts/socket/FreeSWITCH/Client.pm
Log:
add -tolerant option to FreeSWITCH::Client init to only spew nasty warnings, but not intentionally kill the script
Modified: freeswitch/trunk/scripts/socket/FreeSWITCH/Client.pm
==============================================================================
--- freeswitch/trunk/scripts/socket/FreeSWITCH/Client.pm (original)
+++ freeswitch/trunk/scripts/socket/FreeSWITCH/Client.pm Mon Oct 15 13:16:45 2007
@@ -13,6 +13,8 @@
$self->{_host} = $args->{-host} || "localhost";
$self->{_port} = $args->{-port} || 8021;
$self->{_password} = $args->{-password} || undef;
+ $self->{_tolerant} = $args->{-tolerant} || false;
+
$self->{events} = [];
my $me = bless $self,$class;
if (!$self->{_password}) {
@@ -94,7 +96,12 @@
sub error($$) {
my($self,$error) = @_;
- die $error;
+ if ($self->{"_tolerant"}) {
+ print "[DIE CROAKED] $error\n";
+ }
+ else {
+ die $error;
+ }
}
More information about the Freeswitch-svn
mailing list