Hi Nikhil --

Generally speaking, when errors occur in internal/standard modules, we 
typically try to bubble them up to a line in the user's code to help with 
issues like this, but I can't think offhand why that wouldn't be happening 
in this case.  If anyone else does, please feel free to let me know (on- 
or off-list).

If you use the --print-callstack-on-error flag, you will get a full 
compile-time stack trace that led you to that call, which will probably 
give you the information that you want (and then some).

-Brad




On Wed, 25 Feb 2015, Nikhil Padmanabhan wrote:

> Hi,
>
> I just noticed that if you try to write to a reader, Chapel throws an error
> message that points out the failure in the IO module but not the calling
> source code. This is hardly a showstopper, but would it be possible to
> return both (just to make it easier to debug)?
>
> Consider the following test case :
>
> var ff = open("test",iomode.r).reader();
> ff.write(10);
> ff.close();
>
> [npadmana@lovelace:tests] chpl bug_io_write2reader.chpl
> $CHPL_HOME/modules/standard/IO.chpl:2038: error: write on read-only channel
>
> It would be nice if it also pointed out that the call occurred on line
> 2.....
>
> Thanks in advance!
> -- Nikhil
> ---------------------------------
> Nikhil Padmanabhan
> [email protected]
>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to