diff options
author | Hans Bolinder <[email protected]> | 2018-04-24 12:02:54 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2018-04-25 12:29:13 +0200 |
commit | bc38638a3633e028944d142150511fbcdd86cc92 (patch) | |
tree | f1a56859ac261fb69311252fa955261f720021ad /lib/stdlib/src/io_lib.erl | |
parent | 960467ead200635cb935dfd3aa5a5abe38299ca6 (diff) | |
download | otp-bc38638a3633e028944d142150511fbcdd86cc92.tar.gz otp-bc38638a3633e028944d142150511fbcdd86cc92.tar.bz2 otp-bc38638a3633e028944d142150511fbcdd86cc92.zip |
stdlib: Introduce characters limit of formatted strings
The name of the io_lib_pretty:print/2 option 'max_chars' is changed to
'line_max_chars' (used by module shell only).
The new option for limiting the number of returned characters of
io_lib_pretty:print() is called 'chars_limit'.
Diffstat (limited to 'lib/stdlib/src/io_lib.erl')
-rw-r--r-- | lib/stdlib/src/io_lib.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/stdlib/src/io_lib.erl b/lib/stdlib/src/io_lib.erl index e37c13093b..6be953f6ca 100644 --- a/lib/stdlib/src/io_lib.erl +++ b/lib/stdlib/src/io_lib.erl @@ -240,7 +240,7 @@ format_prompt(Prompt, Encoding) -> do_format_prompt(add_modifier(Encoding, "p"), [Prompt]). do_format_prompt(Format, Args) -> - case catch io_lib:format(Format, Args) of + case catch format(Format, Args) of {'EXIT',_} -> "???"; List -> List end. |