Skip to content

Commit

Permalink
Fix for #46 (Improve error message) (#51)
Browse files Browse the repository at this point in the history
added stack trace to error message for easier problem analysis
  • Loading branch information
snehlsen authored and andrehacker committed Nov 26, 2018
1 parent 0f8a54f commit 9ecba8f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Virtual Schemas

[![Build Status](https://travis-ci.org/EXASOL/virtual-schemas.svg?branch=master)](https://travis-ci.org/EXASOL/virtual-schemas)
[![Build Status](https://travis-ci.org/exasol/virtual-schemas.svg?branch=master)](https://travis-ci.org/exasol/virtual-schemas)

<p style="border: 1px solid black;padding: 10px; background-color: #FFFFCC;"><span style="font-size:200%">&#9888;</span> Please note that this is an open source project which is officially supported by Exasol. For any question, you can contact our support team.</p>

Expand Down
2 changes: 1 addition & 1 deletion jdbc-adapter/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# JDBC Adapter for Virtual Schemas

[![Build Status](https://travis-ci.org/EXASOL/virtual-schemas.svg)](https://travis-ci.org/EXASOL/virtual-schemas)
[![Build Status](https://travis-ci.org/exasol/virtual-schemas.svg)](https://travis-ci.org/exasol/virtual-schemas)

## Overview

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ public static String adapterCall(final ExaMetadata meta, final String input) thr
} catch (final AdapterException e) {
throw e;
} catch (final Exception e) {
throw new Exception("Unexpected error in adapter for following request: " + input + "\nResponse: " + result,
String stacktrace = UdfUtils.traceToString(e);
throw new Exception("Unexpected error in adapter: " + e.getMessage() + "\nFor following request: " + input + "\nResponse: " + result + "\nAdapter stack trace: " + stacktrace,
e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,15 @@ public void testCase() throws SQLException, FileNotFoundException {
"SELECT CASE WHEN 1 < \"A\" THEN 'YES' ELSE 'NO' END FROM \"" + TEST_SCHEMA + "\".\"SIMPLE_VALUES\"", IS_LOCAL);
}

@Test
public void testErrorMessages() throws SQLException, FileNotFoundException {
this.thrown.expect(Exception.class);
this.thrown.expectMessage("Could not access the connection information of connection NO_CONNECTION");
createVirtualSchema("VS_EXA_IT_BROKEN", ExasolSqlDialect.getPublicName(), "", "NATIVE_EXA_IT", "NO_CONNECTION",
"", "", "ADAPTER.JDBC_ADAPTER", "",
false, getConfig().debugAddress(), "", null);
}

/**
* This was replaced by integration test {@link #testDataTypeMapping()}. It can
* be enabled temporarily for debugging.
Expand Down

0 comments on commit 9ecba8f

Please sign in to comment.