FLUID-1306: fluid.fail() throws an exception when invoked.

Metadata

Source
FLUID-1306
Type
Bug
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Colin Clark
Reporter
Colin Clark
Created
2008-08-22T12:10:04.000-0400
Updated
2011-02-22T16:27:51.017-0500
Versions
  1. 0.5beta1
Fixed Versions
  1. 0.5beta1
Component
  1. Framework

Description

The fluid.fail() utility method, used to report errors and exceptions, ends up throwing an error itself. Here's the code:

fluid.fail = function (message) {
fluid.utils.setLogging(true);
fluid.utils.debug(message.message? message.message : message);
message.fail(true);
};

It expects message to either be a plain old String (aka "") or a plain old Object (aka {}). However, the last line attempts to invoke a fail() function on the message. Neither String nor Object implements fail(), so it explodes.

Comments

  • Colin Clark commented 2008-08-22T12:11:25.000-0400

    I fixed this by removing the call to message.fail() entirely.

  • Colin Clark commented 2008-08-22T13:56:04.000-0400

    Apparently fluid.fail() is supposed to fail this way, in order to ensure that logging and a real browser error occurs.

  • Michelle D'Souza commented 2011-02-22T16:27:51.014-0500

    Closing issues that were resolved for 1.0 and earlier releases.