From fc3c177cae35bb90b1fbfae39e65f0b368943b5b Mon Sep 17 00:00:00 2001 From: EwaMarek Date: Wed, 18 Sep 2019 09:34:33 +0100 Subject: [PATCH] make error message more informative When one passes a float, let's say -m=2.5G the only message that is returned is: "sambamba-sort: couldn't parse ", which is not very informative, as this someone may blame the input BAM file and spend some time trying to figure out what is wrong with it. The updated error message points directly into the point saving users time. --- sambamba/sort.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sambamba/sort.d b/sambamba/sort.d index 842e0e16..d2d685f4 100644 --- a/sambamba/sort.d +++ b/sambamba/sort.d @@ -604,7 +604,7 @@ size_t parseMemory(string str) { case "GB": return sz * 1_000_000_000; default: - throw new Exception("couldn't parse ", initial_str); + throw new Exception("couldn't parse --memory-limit option ", initial_str); } }