* This list is hardcoded because we didn't succeed in using java.sql.DatabaseMetaData#getTables() in the same way
* for all the supported databases, particularly due to Oracle results.
*/
- public static final String[] TABLE_NAMES = {
+ static final String[] TABLE_NAMES = {
"action_plans",
"action_plans_reviews",
"active_dashboards",
return versions.get(versions.size() - 1);
}
return null;
- } catch (Exception e) {
+ } catch (RuntimeException e) {
// The table SCHEMA_MIGRATIONS does not exist.
// Ignore this exception -> it will be created by Ruby on Rails migrations.
return null;
assertThat(th.getMessage(), Is.is("A good reason to fail"));
}
+ @Test
+ public void shouldSanitizePicoLifecycleException_no_wrapper_message() {
+ Throwable th = PicoUtils.sanitize(new PicoLifecycleException(null, null, new IllegalStateException("msg")));
+
+ assertThat(th, Is.is(IllegalStateException.class));
+ assertThat(th.getMessage(), Is.is("msg"));
+ }
+
@Test
public void shouldNotSanitizeOtherExceptions() {
Throwable th = PicoUtils.sanitize(new IllegalArgumentException("foo"));