Closed
Bug 551057
Opened 15 years ago
Closed 7 years ago
Improve error messages in ctypes
Categories
(Core :: js-ctypes, defect, P1)
Core
js-ctypes
Tracking
()
RESOLVED
DUPLICATE
of bug 891107
Tracking | Status | |
---|---|---|
blocking2.0 | --- | - |
People
(Reporter: dwitte, Unassigned)
References
(Blocks 1 open bug)
Details
+++ This bug was initially created as a clone of Bug #513788 +++
Error messages in ctypes, as implemented in bug 513788, are pretty weak. We should improve them so that TypeErrors etc give nice, understandable messages. Per jorendorff:
* The error messages when type conversion fails are pretty weak! I expect users
to bump into these pretty often, so please do another pass over them and see
if there's any helpful information you can add. A decent type error is like,
can't pass the string "xyzzy" to argument 2 of hypot(double, double)
Reporter | ||
Updated•15 years ago
|
Summary: Revise js-facing API for js-ctypes → Improve error messages in ctypes
Reporter | ||
Comment 1•15 years ago
|
||
From one of jorendorff's myriad review comments in bug 513788:
In Library::Create:
> library = PR_LoadLibraryWithFlags(libSpec, 0);
>- if (!library)
>+ if (!library) {
>+ JS_ReportError(cx, "couldn't open library");
> return NULL;
>+ }
Can we get a useful error message out of NSPR? This is another error that's
going to be very, very common during development.
Comment 2•15 years ago
|
||
Comment 3•15 years ago
|
||
FWIW, the error messages we get from Windows/NSPR aren't that useful.
Updated•15 years ago
|
Assignee: nobody → dwitte
blocking2.0: --- → final+
Updated•15 years ago
|
blocking2.0: final+ → -
Reporter | ||
Comment 6•14 years ago
|
||
Reassigning to nobody. If anyone wants to work on this, feel free!
Assignee: dwitte → nobody
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•