| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Possible to add a test? Seems like we can create an ErrorRecord that hits this code path?
Sorry, something went wrong.
Steve Lee (@SteveL-MSFT) I did not find how to do it :-( |
Sorry, something went wrong.
|
Ilya (@iSazonov) seems like line 802 would have already covered this? Can you show how it looks before and after this change with your error? |
Sorry, something went wrong.
|
Ilya (@iSazonov) Can you provide a repro with your module? |
Sorry, something went wrong.
|
My fix is not right.
The line throws if ToString() throws ($prop.Value has a reference on an object with property with disposed object in my case) I will update the PR. |
Sorry, something went wrong.
There was a problem hiding this comment.
Ok, so it's calling a method on a disposed object.
Sorry, something went wrong.
|
Tried to simulate the original issue of a disposed object, but couldn't find a way to do it. |
Sorry, something went wrong.
I too. I could port a code from AccountManagement module but I think it is not correct behavior for ToString() to throw and I will report the issue to Core team. |
Sorry, something went wrong.
Use LanguagePrimitives.TryConvertTo() as last resort to string conversion.
|
🎉v7.0.0-rc.2 has been released which incorporates this pull request.:tada: Handy links: |
Sorry, something went wrong.
Use LanguagePrimitives.TryConvertTo() as last resort to string conversion.
| Back | FazBrowse Home | New Git URL |
PR Summary
Use LanguagePrimitives.TryConvertTo() as last resort to string conversion.
PR Context
Playing with AccountManagement module I catch an error where properties with disposed object reference present.
PR Checklist