<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>I've been trying to get useful information (the full stack) from Cowboy error reports. But all of our reports are truncated. I found this
<a href="http://stackoverflow.com/questions/17596686/truncated-error-report-in-erlang" id="lnk426200">
http://stackoverflow.com/questions/17596686/truncated-error-report-in-erlang</a>​, but the solution didn't work for me.<br>
</p>
<p><br>
</p>
<p>I looked at the emulator source code and found the undocumented +# switch which controls precision. Using this switch, I verified that the errors are being truncated by the emulator itself (see below).<br>
</p>
<p><br>
</p>
<p>Is this truncation intentional or a bug? Is there a better way around it than the +# switch?<br>
</p>
<p><br>
</p>
<p>At a higher level, is there a better way to get error/crash information from a process than going through error_logger? We're using lager and erlbrake and both add error_logger handlers that parse the text error reports. I would much rather deal with the
 reason term directly. Is there a way to be notified of process termination other than error_logger?<br>
</p>
<p>​<br>
</p>
<p><br>
</p>
<p><br>
</p>
<div>talko@ubuntu:~/talko_service/erl/session$ erl</div>
<div>Erlang/OTP 17 [erts-6.1.2] [source] [64-bit] [smp:6:6] [async-threads:10] [hipe] [kernel-poll:false]</div>
<div><br>
</div>
<div>Eshell V6.1.2  (abort with ^G)</div>
<div>1> spawn(fun() -> erlang:error([$x || _ <- lists:seq(0,5000)]) end).</div>
<div><0.35.0></div>
<div><br>
</div>
<div>=ERROR REPORT==== 24-Oct-2014::22:23:21 ===</div>
<div>Error in process <0.35.0> with exit value: {"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx... </div>
<div><br>
<br>
</div>
<div>talko@ubuntu:~/talko_service/erl/session$ erl +#10</div>
<div>Erlang/OTP 17 [erts-6.1.2] [source] [64-bit] [smp:6:6] [async-threads:10] [hipe] [kernel-poll:false]</div>
<div><br>
</div>
<div>Eshell V6.1.2  (abort with ^G)</div>
<div>1> spawn(fun() -> erlang:error([$x || _ <- lists:seq(0,5000)]) end).</div>
<div><0.35.0></div>
<div>2> </div>
<div>=ERROR REPORT==== 24-Oct-2014::22:23:34 ===</div>
<div>Error in process <0.35.0> with exit value: {"xxxxxxxx... </div>
<div><br>
</div>
<div><span style="font-size: 12pt;"><br>
</span></div>
<div><span style="font-size: 12pt;">talko@ubuntu:~/talko_service/erl/session$ erl +#400</span><br>
</div>
<div>Erlang/OTP 17 [erts-6.1.2] [source] [64-bit] [smp:6:6] [async-threads:10] [hipe] [kernel-poll:false]</div>
<div><br>
</div>
<div>Eshell V6.1.2  (abort with ^G)</div>
<div>1> spawn(fun() -> erlang:error([$x || _ <- lists:seq(0,5000)]) end).</div>
<div><0.35.0></div>
<div>2> </div>
<div>=ERROR REPORT==== 24-Oct-2014::22:23:49 ===</div>
<div>Error in process <0.35.0> with exit value: {"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx... </div>
<div><br>
<br>
</div>
<p><br>
</p>
</body>
</html>