dbops icon indicating copy to clipboard operation
dbops copied to clipboard

DbOps displays SqlException error message twice

Open michaelsync opened this issue 3 years ago • 1 comments

I have the following script.

Install-DBOScript -ScriptPath ./sql-scripts/*.sql -SqlInstance localhost -Database DbUpTest -Credential $sqlcredential -ErrorAction Stop

I noticed that it's executing the file two files according to the error log as below. May I know why?

image

michaelsync avatar Apr 20 '22 13:04 michaelsync

The error log displays error output from two sources here: first comes from the DbUp framework, second comes from the error that it throughs, which is then processed by DBOps and regurgitated again. The script is only run once, but the error is shown twice. I will look into it at some point, though right now I'm not sure what's the best solution would be. Perhaps I'm not going to log SqlExceptions? I'll see how that works first.

nvarscar avatar Apr 21 '22 18:04 nvarscar