Skip to content

Previous exception ignored in fetchOne of AbstractMySqlGateway #6

@vlkolak

Description

@vlkolak

Hi all,

Sometimes exception are catched 1 and never dealt with 2.
Coupled with exception nesting or even outright overriden exception 3 it makes development and debugging very complicated.

Could we just set the previous exception, even just the last one, as the previous exception at L107 ?

  1. } catch (\Exception $e) {
    continue;
    }
  2. throw new NoResultException(sprintf('Unable to find an entity of type "%s" for identifier "%s"', $class, $key));
  3. https://github.com/objective-php/gateway/blob/master/src/MetaGateway.php#L80-L83

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions