Allow passing name of called function to throw_expected_array_*()
[hiphop-php.git] / hphp / hack / src / client / clientUtils.ml
blobaa76898585b7f01bca9834803a7537c714f63bda
1 (**
2 * Copyright (c) 2014, Facebook, Inc.
3 * All rights reserved.
5 * This source code is licensed under the BSD-style license found in the
6 * LICENSE file in the "hack" directory of this source tree. An additional grant
7 * of patent rights can be found in the PATENTS file in the same directory.
9 *)
11 let read_stdin_to_string () =
12 let buf = Buffer.create 4096 in
13 try
14 while true do
15 Buffer.add_string buf (input_line stdin);
16 Buffer.add_char buf '\n'
17 done;
18 assert false
19 with End_of_file ->
20 Buffer.contents buf