#236: document failures with list.hd on an empty list.
---------------------------+------------------------------------------------
 Reporter:  toots          |       Owner:  admin    
     Type:  Documentation  |      Status:  new      
 Priority:  1              |   Milestone:  0.9.0    
Component:  Liquidsoap     |     Version:  0.9.0+svn
 Keywords:                 |         Mac:  1        
    Linux:  1              |      Netbsd:  1        
    Other:  1              |     Freebsd:  1        
---------------------------+------------------------------------------------
 I think this is not documented.. Any call to list.hd should be protected
 in case the list is empty.. For instance:
 {{{
 def my_auth(login,password) =
   result = get_process_lines("/path/to/script #{login} #{password}")
   if list.length(result) == 0 then
     false
   else
     list.hd(result) == "1"
   end
 end
 }}}

-- 
Ticket URL: <http://savonet.rastageeks.org/ticket/236>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Savonet-trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-trac

Reply via email to