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
Actual error context information #6
Comments
Is there an issue you're having? Query errors are already croaked https://github.com/Grinnz/Mojo-SQLite/blob/master/lib/Mojo/SQLite/Database.pm#L113 |
Hmm, its work in simple scripts, but doesn't in mojolicious context: #!/usr/bin/perl
use Mojolicious::Lite;
use Mojo::SQLite;
use Test::Mojo;
use Test::More;
my $s = Mojo::SQLite->new('file:///home/and/test.db?mode=rwc');
get '/' => sub {
$s->db->query('select * from test');
shift->render(text => 'ok');
};
my $t = Test::Mojo->new;
$t->get_ok('/')->status_is(200);
done_testing; And output: $ prove -lv sqlite.pl
sqlite.pl .. [Mon Aug 22 10:58:06 2016] [debug] GET "/"
[Mon Aug 22 10:58:06 2016] [debug] Routing to a callback
[Mon Aug 22 10:58:06 2016] [error] DBD::SQLite::db prepare_cached failed: no such table: test at /usr/local/share/perl/5.22.1/Mojo/SQLite/Database.pm line 103.
[Mon Aug 22 10:58:06 2016] [debug] Template "exception.development.html.ep" not found
[Mon Aug 22 10:58:06 2016] [debug] Template "exception.html.ep" not found
[Mon Aug 22 10:58:06 2016] [debug] Rendering template "mojo/debug.html.ep"
[Mon Aug 22 10:58:06 2016] [debug] Rendering template "mojo/menubar.html.ep"
[Mon Aug 22 10:58:06 2016] [debug] Your secret passphrase needs to be changed
[Mon Aug 22 10:58:06 2016] [debug] 500 Internal Server Error (0.023959s, 41.738/s)
ok 1 - GET /
not ok 2 - 200 OK
# Failed test '200 OK'
# at sqlite.pl line 17.
# got: '500'
# expected: '200'
1..2
# Looks like you failed 1 test of 2.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests
Test Summary Report
-------------------
sqlite.pl (Wstat: 256 Tests: 2 Failed: 1)
Failed test: 2
Non-zero exit status: 1
Files=1, Tests=2, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.34 cusr 0.00 csys = 0.37 CPU)
Result: FAIL |
Grinnz
added a commit
that referenced
this issue
Nov 29, 2016
This should be improved in 1.002. Please reopen if you have any further issue. |
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue like this mojolicious/mojo-pg#20
Does this solution mojolicious/mojo-pg@7a710ad actual for
Mojo::SQLite
?The text was updated successfully, but these errors were encountered: