Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
entity system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
20 Oct 2015 at 16:38 UTC
Updated:
7 Nov 2015 at 14:24 UTC
Jump to comment: Most recent
Comments
Comment #2
jhodgdonWith this patch, a test failure I had gave me this message:
Drupal\Core\Entity\EntityStorageException: Exception thrown while performing a schema update. SQLSTATE[42S02]: Base table or view not found: 1146 Table 'd8test.simpletest626768field_deleted_revision_e3b0c44298' doesn't exist: SELECT 1 AS expression FROM {field_deleted_revision_e3b0c44298} t WHERE ( (field_test_int_value IS NOT NULL ) ) LIMIT 1 OFFSET 0; Array ( ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException() (line 1461 of ..../core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
instead of just
Drupal\Core\Entity\EntityStorageException: Exception thrown while performing a schema update. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->wrapSchemaException() (line 1459 of ..../core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
This was from the 2nd catch section. I haven't tested to see if an exception from the 1st catch section gives a helpful message, but it probably can't be worse than just throwing out the message from the previous exception, right?
Comment #3
tim.plunkettIf only exception messages could be classified as docs, this would be rc eligible :)
That said, I think it's worth getting this in. I've usually just worked around this by putting a breakpoint in wrapSchemaException(), but why force everyone to rely on a debugger?
Comment #4
xjmDiscussed with the D8 committers and we agreed with making this an rc target.
Comment #5
xjmCommitted and pushed to 8.0.x. Thanks!
Comment #7
berdirWe should really fix our exception handling to show wrapped/nested exceptions too, that would solve this in a better way. Any exception thrown while saving an entity has the exact same problem.
Comment #8
jhodgdonI don't understand why we are doing catch/wrap strategies anyway really. ?!? It just masks the real problems.