From b828ff52cff548c10f8578130c4f931f5257970d Mon Sep 17 00:00:00 2001 From: blackhedd Date: Tue, 4 Sep 2007 12:07:35 +0000 Subject: [PATCH] Changed error classes to inherit from StandardError instead of Exception. This should make them easier to use with irb. --- ChangeLog | 3 +++ lib/net/ber.rb | 2 +- lib/net/ldap.rb | 2 +- lib/net/ldap/pdu.rb | 2 +- lib/net/snmp.rb | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f93685..71dda06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -42,6 +42,9 @@ for the patch. * Applied an additional patch from Kouhei. * Allowed comma in filter strings, suggested by Kouhei. +* 04Sep07, Changed four error classes to inherit from StandardError rather + Exception, in order to be friendlier to irb. Suggested by Kouhei. + == Net::LDAP 0.0.4: August 15, 2006 * Undeprecated Net::LDAP#modify. Thanks to Justin Forder for diff --git a/lib/net/ber.rb b/lib/net/ber.rb index b0c79c7..dbe2fbd 100644 --- a/lib/net/ber.rb +++ b/lib/net/ber.rb @@ -33,7 +33,7 @@ module Net module BER - class BerError < Exception; end + class BerError < StandardError; end class BerIdentifiedString < String diff --git a/lib/net/ldap.rb b/lib/net/ldap.rb index c9b76d4..b9d7b0e 100644 --- a/lib/net/ldap.rb +++ b/lib/net/ldap.rb @@ -261,7 +261,7 @@ module Net class LDAP - class LdapError < Exception; end + class LdapError < StandardError; end VERSION = "0.1.0" diff --git a/lib/net/ldap/pdu.rb b/lib/net/ldap/pdu.rb index 585b28c..c47735e 100644 --- a/lib/net/ldap/pdu.rb +++ b/lib/net/ldap/pdu.rb @@ -31,7 +31,7 @@ module Net -class LdapPduError < Exception; end +class LdapPduError < StandardError; end class LdapPdu diff --git a/lib/net/snmp.rb b/lib/net/snmp.rb index 1fda412..f74f265 100644 --- a/lib/net/snmp.rb +++ b/lib/net/snmp.rb @@ -94,7 +94,7 @@ module Net end class SnmpPdu - class Error < Exception; end + class Error < StandardError; end PduTypes = [ :get_request,