You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$newmessage= ($newmessage-replace"An exception occurred while executing a Transact-SQL statement or batch. ---> Microsoft.Data.SqlClient.SqlException:").Trim()
46
+
$newmessage=$message
47
+
if ($newmessage-like'*at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql*') {
if ($newmessage-like'*An exception occurred while executing a Transact-SQL statement or batch. ---> Microsoft.Data.SqlClient.SqlException:*') {
54
+
$newmessage= ($newmessage-replace"An exception occurred while executing a Transact-SQL statement or batch. ---> Microsoft.Data.SqlClient.SqlException:").Trim()
55
+
}
56
+
if ($newmessage-like'*An exception occurred while executing a Transact-SQL statement or batch*') {
57
+
$newmessage= ($newmessage-split"An exception occurred while executing a Transact-SQL statement or batch")[1]
0 commit comments