digitalmars.D.bugs - Bad runtime error message (conversion)
- Lars Ivar Igesund (11/11) Jul 23 2004 Upon running a program of mine, it crashes with the (very helpful) messa...
- Lars Ivar Igesund (3/19) Jul 23 2004 Well, found it. I was trying to toInt a zero length string. The error
- J C Calvarese (19/38) Jul 23 2004 I agree it can be hard to understand. I haven't run into this particular...
Upon running a program of mine, it crashes with the (very helpful) message: "Error: Error: conversion" Can anybody tell me what kind of statements could cause such an error? A line number would have been nice, of course, but I doubt a new version incorporating this will turn up today :). Also, is it possible to have line numbers printed for AVs? And ArrayBoundsError (Exception...) isn't very exact for the case where you try to do arr[m..n] when m > n and (0 <= m,n < arr.length). Lars Ivar Igesund
Jul 23 2004
Lars Ivar Igesund wrote:Upon running a program of mine, it crashes with the (very helpful) message: "Error: Error: conversion" Can anybody tell me what kind of statements could cause such an error? A line number would have been nice, of course, but I doubt a new version incorporating this will turn up today :).Well, found it. I was trying to toInt a zero length string. The error message was somewhat terse, though.Also, is it possible to have line numbers printed for AVs? And ArrayBoundsError (Exception...) isn't very exact for the case where you try to do arr[m..n] when m > n and (0 <= m,n < arr.length). Lars Ivar Igesund
Jul 23 2004
In article <cdqv2o$1seq$1 digitaldaemon.com>, Lars Ivar Igesund says...Lars Ivar Igesund wrote:I agree it can be hard to understand. I haven't run into this particular problem before, but I see how it would be confusing. The error message actually includes the invalid string, but in this case the invalid string is "invisible". Perhaps, we can change line 22 on std\conv.d from to It would help in this case and probably others, too. Here's the code I used to observe the problem: #import std.conv; #void main()Upon running a program of mine, it crashes with the (very helpful) message: "Error: Error: conversion" Can anybody tell me what kind of statements could cause such an error? A line number would have been nice, of course, but I doubt a new version incorporating this will turn up today :).Well, found it. I was trying to toInt a zero length string. The error message was somewhat terse, though.jcc7Also, is it possible to have line numbers printed for AVs? And ArrayBoundsError (Exception...) isn't very exact for the case where you try to do arr[m..n] when m > n and (0 <= m,n < arr.length). Lars Ivar Igesund
Jul 23 2004