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

DB::beginTransaction exception throwing #57

Closed
DaneEveritt opened this issue Feb 13, 2016 · 0 comments
Closed

DB::beginTransaction exception throwing #57

DaneEveritt opened this issue Feb 13, 2016 · 0 comments
Assignees
Labels
bug Something that's not working as it's intended to be.
Milestone

Comments

@DaneEveritt
Copy link
Member

Throwing an exception within DB::beginTransaction will fail to register in the parent try/catch block. Basically, this code fails:

DB::beginTransaction();

// logic checking here
throw new DisplayException('Some Exception');

try {
    DB::commit();
} catch (\Exception $ex) {
    throw $ex;
}

This code works:

DB::beginTransaction();

try {
    // logic checking here
    throw new DisplayException('Some Exception');

    DB::commit();
} catch (\Exception $ex) {
    throw $ex;
}

There are probably a few places throughout the code that use the broken setup which makes it hard to debug errors since nothing is displayed, it just fails.

@DaneEveritt DaneEveritt added the bug Something that's not working as it's intended to be. label Feb 13, 2016
@DaneEveritt DaneEveritt added this to the v0.1.3-beta milestone Feb 13, 2016
@DaneEveritt DaneEveritt self-assigned this Feb 13, 2016
DaneEveritt added a commit that referenced this issue Feb 13, 2016
Also fixes display issue on front-end where users could see and edit
hidden settings
Fixes a bug in relation to #57
DaneEveritt added a commit that referenced this issue Feb 15, 2016
@DaneEveritt DaneEveritt modified the milestones: v0.1.3-beta, v0.2.1 Feb 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that's not working as it's intended to be.
Projects
None yet
Development

No branches or pull requests

1 participant