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
{{ message }}
Repository navigation
Swallow exceptions in NpgsqlDataReader.Dispose() #2372
@roji Could you provide a little bit more details about it? Otherwise, you're violating rules mentioned in the template, and we know nothing you have in the mind (:
Yeah, sorry about that :) I wrote it in the middle of a discussion to make sure I wouldn't forget :) Am going to update the issue with a real description.
I think I found another place where exceptions are being thrown in Dispose(). It appears that NpgsqlTransaction.Dispose(Boolean disposing) needs to swallow exceptions as well.
LibraryConsoleApplication Critical: 0 : Npgsql.NpgsqlOperationInProgressException (0x80004005): A command is already in progress: SELECT ... FROM user_users
at Npgsql.NpgsqlConnector.<StartUserAction>g__DoStartUserAction|233_0(<>c__DisplayClass233_0& )
at Npgsql.NpgsqlConnector.StartUserAction(ConnectorState newState, NpgsqlCommand command, CancellationToken cancellationToken, Boolean attemptPgCancellation)
at Npgsql.NpgsqlConnector.StartUserAction(CancellationToken cancellationToken, Boolean attemptPgCancellation)
at Npgsql.NpgsqlConnector.Rollback(Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlTransaction.Rollback()
at Npgsql.NpgsqlTransaction.Dispose(Boolean disposing)
at System.Data.Common.DbTransaction.Dispose()
at LdpLibrary.LdpDapperContext.Dispose() in C:\Users\jemiller\Documents\Visual Studio 2017\Projects\Library5\LdpLibrary\LdpDapperContext.cs:line 1060
at LibraryConsoleApplication.Program2.LoadPeople() in C:\Users\jemiller\Documents\Visual Studio 2017\Projects\Library5\LibraryConsoleApplication\Program2.cs:line 1828
at LibraryConsoleApplication.Program2.Main(String[] args) in C:\Users\jemiller\Documents\Visual Studio 2017\Projects\Library5\LibraryConsoleApplication\Program2.cs:line 87
Activity
YohDeadfall commentedon Mar 18, 2019
@roji Could you provide a little bit more details about it? Otherwise, you're violating rules mentioned in the template, and we know nothing you have in the mind (:
roji commentedon Mar 18, 2019
Yeah, sorry about that :) I wrote it in the middle of a discussion to make sure I wouldn't forget :) Am going to update the issue with a real description.
tedypranolo commentedon Sep 15, 2019
roji commentedon Sep 15, 2019
tedypranolo commentedon Sep 15, 2019
Swallow exceptions when disposing reader (#3317)
[-]Consider not throwing from NpgsqlDataReader.Dispose()[/-][+]Swallow exceptions in NpgsqlDataReader.Dispose()[/+]jemiller0 commentedon Dec 7, 2020
I think I found another place where exceptions are being thrown in
Dispose(). It appears thatNpgsqlTransaction.Dispose(Boolean disposing)needs to swallow exceptions as well.roji commentedon Dec 9, 2020
@jemiller0 can you please open a new issue for that?