[erlang-questions] Can epp_dodge:parse accept a ram_file?
Sina Samavati
sina.samv@REDACTED
Tue Feb 11 17:05:23 CET 2014
Leo Liu <sdl.web@REDACTED> writes:
> In
>
> {ok, IoDevice} = file:open(Text, [ram]),
> epp_dodger:parse(IoDevice, 1, [{no_fail, true}])
>
> where Text is a string, I am always getting:
>
> exception error: no function clause matching
> io:request({file_descriptor,ram_file,#Port<0.13034>},
> {get_until,unicode,[],erl_scan,tokens,[1,[]]}) (io.erl, line 553)
In your snippet, IoDevice is '{file_descriptor, ram_file, #<PORT>}', whereas the
first argument of epp_dodger:parse/3 must be a Pid.
Why don't create a temporary file?
--
Sina Samavati
Software engineer
https://github.com/s1n4
https://twitter.com/sinasamavati
More information about the erlang-questions
mailing list