Open Bug 1602560 Opened 4 years ago Updated 2 years ago

Error messages like "argument not a number" should be improved

Categories

(Toolkit :: Telemetry, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: mythmon, Unassigned)

References

Details

Attachments

(1 file)

Attached image image.png

Consider the following code

const { UptakeTelemetry } = ChromeUtils.import("resource://services-common/uptake-telemetry.js");
UptakeTelemetry.report("test", undefined, { source: 'test' });

This prints an unhelpful error without a stack trace

Argument not a number

Perhaps this could say something like this?

UptakeTelemetry.report expected a number for status, got {status}

More broadly, the error messages in internal_JSHistogram_CoerceValue are too terse to be maximally helpful. We should include the name of the offending probe, the difference between expectation and reality, and what we're going to do about it (in every case we just log and don't throw/assert/etc).

Pretty sure attempts at a stack trace will be insufficiently helpful as this code is shared across languages and processes. But that doesn't mean we can't do other things to make others' lives easier.

Summary: When Uptake status is undefined, the error message is unhelpfully "argument is not a number" → Error messages like "argument not a number" should be improved
Priority: -- → P3
Severity: normal normal → S3 S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: