Skip to content

Catch \Throwable instead of \Exception in PHP7 #49

@joshdifabio

Description

@joshdifabio

Type errors are not caught by the React Promise implementation in PHP7. It's fairly trivial to implement catch-all for PHP7 and PHP5 without breaking BC.

try {
  // call a success/error/progress handler
} catch (\Throwable $e) {
  // handle $e
} catch (\Exception $e) {
  // handle $e
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions