Skip to content

Commit

Permalink
Make Parrot_io_readline throw exception on Socket
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandobrito committed Dec 1, 2010
1 parent da7f551 commit 617ebe6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/io/api.c
Expand Up @@ -512,6 +512,10 @@ Parrot_io_readline(PARROT_INTERP, ARGMOD(PMC *pmc))
result = STRING_substr(interp, result, offset, read_length);
SETATTR_StringHandle_read_offset(interp, pmc, newline_pos + 1);
}
else if (pmc->vtable->base_type == enum_class_Socket) {
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
"Parrot_io_readline on Socket not implemented");
}
else
Parrot_pcc_invoke_method_from_c_args(interp, pmc, CONST_STRING(interp, "readline"), "->S", &result);
return result;
Expand Down

0 comments on commit 617ebe6

Please sign in to comment.