[#6676] Add markdown to error message about slow SQL

This commit is contained in:
lukaseder 2017-10-11 10:05:56 +02:00
parent f7c79307bc
commit 682d4a03cf

View File

@ -279,8 +279,9 @@ public abstract class AbstractDatabase implements Database {
"Slow SQL",
"jOOQ Meta executed a slow query (slower than 5 seconds)"
+ "\n\n"
+ "Please report this bug here: https://github.com/jOOQ/jOOQ/issues/new\n\n"
+ formatted(ctx.query()),
+ "Please report this bug here: https://github.com/jOOQ/jOOQ/issues/new\n\n```sql\n"
+ formatted(ctx.query())
+ "```\n",
new SQLPerformanceWarning());
}
}
@ -296,8 +297,9 @@ public abstract class AbstractDatabase implements Database {
? ctx.exception().getMessage()
: "No exception available")
+ "\n\n"
+ "Please report this bug here: https://github.com/jOOQ/jOOQ/issues/new\n\n"
+ formatted(ctx.query()));
+ "Please report this bug here: https://github.com/jOOQ/jOOQ/issues/new\n\n```sql\n"
+ formatted(ctx.query())
+ "```\n");
}
private String formatted(Query query) {