Open aam opened 10 years ago
Unreadable exception is being thrown when there is error in insert statement(quotes vs apostrophes).
Sample program:
import 'package:oracledart/oracledart.dart'; void main() { connect( "scott", "tiger", "(DESCRIPTION=" "(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))" "(CONNECT_DATA=(SERVICE_NAME=XE)(SERVER=DEDICATED)))") .then((connection) { connection.select("insert into emp(name, age) values('defgh', 2345)"); resultset = connection.select("select name, age from emp"); while (resultset.next()) { print("${resultset.getString(1)}: ${resultset.getInt(2)}"); } }); }
D:>dart test.dart Uncaught Error: ▲ Stack Trace: #0 _OracleStatement._execute (package:oracledart/oracledart_synchronous_extension.dart:48:75) #1 _OracleStatement.executeQuery (package:oracledart/oracledart_synchronous_extension.dart:51:13) #2 _OracleConnection.select (package:oracledart/oracledart_synchronous_extension.dart:33:34) #3 main.<anonymous closure> (file:///D:/dart1.ws/odtest/bin/test.dart:16:28) #4 _RootZone.runUnary (dart:async/zone.dart:1088) #5 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:488) #6 _Future._propagateToListeners (dart:async/future_impl.dart:571) #7 _Future._complete (dart:async/future_impl.dart:317) #8 Future.Future.<anonymous closure> (dart:async/future.dart:118) #9 Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:12) #10 _handleTimeout (dart:io/timer_impl.dart:292) #11 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:122) Unhandled exception: ▲ #0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:826) #1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23) #2 _asyncRunCallback (dart:async/schedule_microtask.dart:32) #3 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:126)
Unreadable exception is being thrown when there is error in insert statement(quotes vs apostrophes).
Sample program: