PacketFence - BTS - PacketFence
View Issue Details
0000755PacketFencepublic2009-07-23 10:102011-01-26 15:43
obilodeau 
obilodeau 
normalmajoralways
closedfixed 
 
 
0000755: unhelpful packetfence error message when a switch module doesn't compile
When an SNMP switch module that is used by the configuration doesn't compile, you get this error message:

> Can't use string ("0") as a HASH ref while "strict refs" in use at
> /usr/local/pf/lib/pf/services.pm line 775 (0000001)
> (F) Only hard references are allowed by "strict refs". Symbolic
> references are disallowed. See perlref.

Not very helpful. I should wrap that loop in an eval or carp and try to give a bette explanation and maybe even fail gracefully, only ignoring this module and go on.
No tags attached.
has duplicate 0000813closed obilodeau When a switch doesn't compile, packetfence issues an error but then goes on like its normal 
Issue History
2009-07-23 10:10obilodeauNew Issue
2009-07-23 10:10obilodeauStatusnew => assigned
2009-07-23 10:10obilodeauAssigned To => obilodeau
2009-10-15 14:19rbalzardNote Added: 0001333
2009-10-15 14:20rbalzardStatusassigned => resolved
2009-10-15 14:20rbalzardResolutionopen => fixed
2009-10-16 10:12obilodeauRelationship addedhas duplicate 0000813
2009-10-16 10:36obilodeauNote Added: 0001346
2011-01-26 15:43obilodeauStatusresolved => closed

Notes
(0001333)
rbalzard   
2009-10-15 14:19   
fixed in revision 5815165026bd8d612710cba3cb088b9d3c931e80
(0001346)
obilodeau   
2009-10-16 10:36   
Review:
- I would remove NEWS file entry, I consider this point covered by "error reporting fixes"
- tests were added but I see no return() calls, are all the error cases carefully avoided by the if {} else ?
- in vlan.pm: two lines are longer than 120, we should wrap them

Aside from these little things, it looks fine, good work!