From:             ch
Operating system: 
PHP version:      5.4.0alpha3
Package:          SNMP related
Bug Type:         Feature/Change Request
Bug description:SNMP class should use Exceptions instead of PHP Errors

Description:
------------
Hello

Subject says all, IMHO it does not make sense to start writing a new class
that does not use 100% exceptions.

This bug is a follow up on #40816 which ended with:

 [2011-08-30 15:18 UTC] lytbo...@php.net

> I have read a bunch of threads on php-dev about extensions throwing
exceptions and the last thing I remember that extension should not throw
any exception except object creation if there is no way to disable them.

> Anyway, if to throw exceptions, library will throw an exception for each
error, not only parsing error.


Please, please, convinced yourself that Exceptions are cool and worth
refactoring the code. I'd be willing to help with writing tests :)

I'd be curious about the threads you mentioned (a quick google found
nothing but then the keywords are very common) but there are already some
extensions (spl/php_spl.c, mysql/php_mysql.c, reflection/php_reflection.c)
that do throw Exceptions.



-- 
Edit bug report at https://bugs.php.net/bug.php?id=55542&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=55542&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=55542&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=55542&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=55542&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=55542&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=55542&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=55542&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=55542&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=55542&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=55542&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=55542&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=55542&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=55542&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=55542&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=55542&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55542&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=55542&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=55542&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=55542&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=55542&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=55542&r=mysqlcfg

Reply via email to