Assuming the exception object is e, you can check out e.
Exceptions and rescuing them works like this (assuming you want to
st.execute throws a MysqlException):
begin
st.execute(dataArray[0],dataArray[1],dataArray[2],dataArray[3],tradeDate,dataArray[5],dataArray[6])
rescue MysqlException => e
puts e.message
end