#281: Cannot raise Lang.Invalid_data with abritrary Lang.value
------------------------+---------------------------------------------------
 Reporter:  toots       |       Owner:  admin      
     Type:  Bugs        |      Status:  new        
 Priority:  1           |   Milestone:  NEAR FUTURE
Component:  Liquidsoap  |     Version:  0.9.0+svn  
 Keywords:              |         Mac:  1          
    Linux:  1           |      Netbsd:  1          
    Other:  1           |     Freebsd:  1          
------------------------+---------------------------------------------------
 Apparently, the printing method when raising Lang.Invalid_value requires a
 location in the parsed script. Hence, it cannot be raised in a generic
 context, such as when building a source with an invalid (int) parameter:
 {{{
   let () =
     if nb_blocks < 2 then
       raise (Lang.Invalid_value
                  (Lang.int nb_blocks,
                   "Buffered I/O requires a buffer length >= 2."))
   in
 }}}

 Will raise:
 {{{
 Fatal error: exception Assert_failure("tools/utils.ml", 23, 46)
 Called from file "lang/lang.ml", line 396, characters 15-41
 Called from file "lang/lang.ml", line 423, characters 4-42
 Called from file "arg.ml", line 203, characters 11-20
 Called from file "main.ml", line 390, characters 4-33
 Called from file "main.ml", line 412, characters 2-68
 }}}

 I think I could be able to fix this by changing {{{Utils.get_some}}} to
 something dealing with {{{None}}} in lang/lang.ml, 396, but I think this
 is not my domain of expertise there :)

-- 
Ticket URL: <http://savonet.rastageeks.org/ticket/281>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Savonet-trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-trac

Reply via email to