Adding special exception for database
This commit is contained in:
parent
9280402032
commit
1ce7188931
@ -6,6 +6,7 @@ import fr.molzonas.mzcore.database.provider.MZDatabaseProvider;
|
||||
import fr.molzonas.mzcore.database.provider.MZDatabaseProviderMariaDB;
|
||||
import fr.molzonas.mzcore.database.provider.MZDatabaseProviderPostgreSQL;
|
||||
import fr.molzonas.mzcore.database.provider.MZDatabaseProviderSQLite;
|
||||
import fr.molzonas.mzcore.exception.MZDatabaseException;
|
||||
import org.flywaydb.core.Flyway;
|
||||
import org.jooq.SQLDialect;
|
||||
import org.jooq.codegen.GenerationTool;
|
||||
@ -36,7 +37,7 @@ public final class MZCodegen {
|
||||
try {
|
||||
GenerationTool.generate(buildJooqConfiguration(config, provider, targetFolder, targetPackage));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("jOOQ codegen failed", e);
|
||||
throw new MZDatabaseException("jOOQ codegen failed", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
package fr.molzonas.mzcore.exception;
|
||||
|
||||
public class MZDatabaseException extends RuntimeException {
|
||||
public MZDatabaseException(String message) {
|
||||
super(message);
|
||||
}
|
||||
public MZDatabaseException(Exception e) {
|
||||
super(e);
|
||||
}
|
||||
public MZDatabaseException(Throwable t) {
|
||||
super(t);
|
||||
}
|
||||
public MZDatabaseException(String message, Throwable t) {
|
||||
super(message, t);
|
||||
}
|
||||
public MZDatabaseException(String message, Exception e) {
|
||||
super(message, e);
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user