bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to make "division by zero attempted" error message more informative?


From: Peng Yu
Subject: How to make "division by zero attempted" error message more informative?
Date: Thu, 3 Mar 2022 06:46:08 -0600

I see something like this. But when this kind of command is called at
multiple scripts. It is hard to tell where the error is from.

$ awk -e '{ print 10/$1 }' <<< 0
awk: cmd. line:1: (FILENAME=- FNR=1) fatal: division by zero attempted

Is there a way to customize the error message so that I can know where the
error is coming from? Thanks.

-- 
Regards,
Peng


reply via email to

[Prev in Thread] Current Thread [Next in Thread]