Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DbOps displays SqlException error message twice #135

Open
michaelsync opened this issue Apr 20, 2022 · 1 comment
Open

DbOps displays SqlException error message twice #135

michaelsync opened this issue Apr 20, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@michaelsync
Copy link

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

@nvarscar
Copy link
Collaborator

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 nvarscar added the enhancement New feature or request label Apr 21, 2022
@nvarscar nvarscar changed the title Why does DbOps execute the script file two times when there is an error? DbOps displays SqlException error message twice Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants