Problem/Motivation

`Drupal.throwError` is rethrow the error message. If you are passing String into `Drupal.throwError`, there's no more useful error stack for debugging.

It need not to check param type explicitly but should discourage its usage in our API design.

Proposed resolution

- Remove String type in JSDoc

Remaining tasks

- Review patch

User interface changes

- N/A

API changes

- Docs change. Do not affect any code usages.

Data model changes

- N/A

Files: 
CommentFileSizeAuthor
Drupal.throwError.patch447 bytesdroplet

Comments

droplet created an issue. See original summary.

droplet’s picture

Issue summary: View changes

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.