Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrupt exception object #470

Closed
rakudrama opened this issue Nov 16, 2011 · 5 comments
Closed

Corrupt exception object #470

rakudrama opened this issue Nov 16, 2011 · 5 comments
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@rakudrama
Copy link
Member

I expect the attached program to run without assertion with --enable_type_checks

Something throws an exception, but the exception's toString method throws a secondary exception. It appears that code is missing from the NoSuchMethodException constructor - there is no _arguments property.

function $toDartException(e) {
  ...
      } else {
          // TODO(jmesserly): can this ever happen?
          res = new NoSuchMethodException('', e.arguments[0], []);
  ...
}

// ********** Code for NoSuchMethodException **************
function NoSuchMethodException() {}
NoSuchMethodException.prototype.toString = function() {
  var sb = new StringBufferImpl("");
  for (var i = 0;
   i < this._arguments.length; i++) {
    if (i > 0) {
      sb.add(", ");
    }
    sb.add(this._arguments.$index(i));
  }
  sb.add("]");
  return ("NoSuchMethodException - receiver: '" + this._receiver + "' ") + ("function name: '" + this._functionName + "' arguments: [" + sb + "]");
}


Attachment:
check1c.dart (545 Bytes)

@rakudrama
Copy link
Member Author

I just hit this again. The bug makes it difficult to generate succinct test cases for other problems.

@rakudrama
Copy link
Member Author

Added Area-Frog label.

@DartBot
Copy link

DartBot commented Nov 23, 2011

This comment was originally written by jimhug@google.com


Moving this to high priority to reflect Stephen's comment that this is blocking other work. I propose that we start using these priorities in this way when filing bugs as well to help identify those that need to be addressed sooner.


Removed Priority-Medium label.
Added Priority-High label.

@jmesserly
Copy link

Added Started label.

@jmesserly
Copy link

Added Fixed label.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

3 participants