Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getBytes and toCharArray raising exceptions #87

Open
oubiwann opened this issue Apr 11, 2014 · 0 comments
Open

getBytes and toCharArray raising exceptions #87

oubiwann opened this issue Apr 11, 2014 · 0 comments

Comments

@oubiwann
Copy link

Hey all,

Doing more explorations with Erjang and Java calls, and I came across this. At first I thought it was only a problem in LFE, but in Erjang-proper it threw errors as well.

Here's a paste of my session:

1> c(java).
{ok,java}
2> Tmpfile = 'java.io.File':createTempFile("foo-", "-bar").
<<>>
3> java:call(Tmpfile, getPath, [], []).
"/var/folders/c8/2cl5l5_102b1qq8bh05t7xw40000gn/T/foo-6047105912485405234-bar"
4> java:call(java:call(Tmpfile, isFile, [], []), toString, [], []).
"true"
5> java:call(java:call(Tmpfile, getPath, [], []), length, [], []).
76
6> java:call(java:call(Tmpfile, getPath, [], []), getBytes, [], []).
** exception error: no function clause matching
                    io_lib_pretty:cind_list({{list,
                                              {{list,
                                                {{list,
                                                  {{list,
                                                    {{list,
                                                      {{list,
                                                        {{list,
                                                          {{list,
                                                            {{list,
                                                              {{...},...}},
                                                             45}},
                                                           47}},
                                                         49}},
                                                       51}},
                                                     53}},
                                                   55}},
                                                 57}},
                                               59}},
                                             61},
                                            2,80,60,-1,0,1) (io_lib_pretty.erl, line -1)
     in function  io_lib_pretty:while_fail/3 (io_lib_pretty.erl, line 704)
     in call from io_lib_pretty:print/8 (io_lib_pretty.erl, line 111)
7> java:call(java:call(Tmpfile, getPath, [], []), toCharArray, [], []).
** exception error: no function clause matching
                    io_lib_pretty:cind_list({{list,
                                              {{list,
                                                {{list,
                                                  {{list,
                                                    {{list,
                                                      {{list,
                                                        {{list,
                                                          {{list,
                                                            {{list,
                                                              {{...},...}},
                                                             45}},
                                                           47}},
                                                         49}},
                                                       51}},
                                                     53}},
                                                   55}},
                                                 57}},
                                               59}},
                                             61},
                                            2,80,60,-1,0,1) (io_lib_pretty.erl, line -1)
     in function  io_lib_pretty:while_fail/3 (io_lib_pretty.erl, line 704)
     in call from io_lib_pretty:print/8 (io_lib_pretty.erl, line 111)
8>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant