mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
fixes + sqlite error line number
This commit is contained in:
parent
7781ad69cf
commit
2b26779ea8
@ -156,7 +156,7 @@ class StreamHandler {
|
||||
this.resolve();
|
||||
}
|
||||
info(info) {
|
||||
if (info.line != null) {
|
||||
if (info && info.line != null) {
|
||||
info = {
|
||||
...info,
|
||||
line: this.startLine + info.line,
|
||||
@ -168,7 +168,8 @@ class StreamHandler {
|
||||
|
||||
function handleStream(driver, resultIndexHolder, sqlItem) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const handler = new StreamHandler(resultIndexHolder, resolve, sqlItem.trimStart.line);
|
||||
const start = sqlItem.trimStart || sqlItem.start;
|
||||
const handler = new StreamHandler(resultIndexHolder, resolve, start && start.line);
|
||||
driver.stream(systemConnection, sqlItem.text, handler);
|
||||
});
|
||||
}
|
||||
|
@ -49,7 +49,7 @@
|
||||
|
||||
$: {
|
||||
if (onChangeErrors) {
|
||||
const errors = displayedMessages.filter(x => x.severity == 'error');
|
||||
const errors = displayedMessages.filter(x => x.severity == 'error' && x.line != null);
|
||||
if (lastErrorMessageCountRef.get() != errors.length) {
|
||||
onChangeErrors(
|
||||
errors.map(err => ({
|
||||
|
@ -104,10 +104,10 @@ const driver = {
|
||||
inTransaction();
|
||||
} catch (error) {
|
||||
console.log('ERROR', error);
|
||||
const { message, lineNumber, procName } = error;
|
||||
const { message, procName } = error;
|
||||
options.info({
|
||||
message,
|
||||
line: lineNumber,
|
||||
line: 0,
|
||||
procedure: procName,
|
||||
time: new Date(),
|
||||
severity: 'error',
|
||||
|
Loading…
Reference in New Issue
Block a user