I am using try do catch to handle division by zero error in a button but it showing some errors in the code that... Invalid conversion from throwing function of type '() throws -> Void' to non- throwing function type '() -> Void' How to solve?
i saw the ErrorWrapper in the scrumdinger app, but spaced how it was really implemented. Thanks for showing this. I tried plopping this in another project which uses a lot of asynchronous calls, and I get a "Attempt to present on screen(?) already presenting". It worked once, but now i get this error all the time, even when using the example authenticate button. in stack overflow, there is use of using asyncAfter. any thoughts?
@azamsharp Ok, so after a while of not trying, it works, sort of. Possibly because of the async nature of the app, on an error, there is a brief attempt at the sheet, then it slides down, then a sheet with the real error appears.
good work :) i have one question about restarting the Simulator i have this problem after updating the Xcode to 14.0 every time i run the application i must restart it to run idk what should i do ?
Hey azam, i came up with same approach to centralize error management, however, i am not sure it will work if we present new views with fullscreencover modifier, am i wrong? Should this logic be injected in every, lets find a word, ‘hierarchy flow’ ?
Thanks Mr. Azam. When being a 'sharp' minded person, good stuff is coming out. 🤩
How can we throw errors from view model?
I am using try do catch to handle division by zero error in a button but it showing some errors in the code that...
Invalid conversion from throwing function of type '() throws -> Void' to non- throwing function type '() -> Void'
How to solve?
i saw the ErrorWrapper in the scrumdinger app, but spaced how it was really implemented. Thanks for showing this. I tried plopping this in another project which uses a lot of asynchronous calls, and I get a "Attempt to present on screen(?) already presenting". It worked once, but now i get this error all the time, even when using the example authenticate button. in stack overflow, there is use of using asyncAfter. any thoughts?
Are you sure you are attaching the sheet at the current location?
@@azamsharp i attached it to the ContentView of App, part of the windowGroup
@azamsharp Ok, so after a while of not trying, it works, sort of. Possibly because of the async nature of the app, on an error, there is a brief attempt at the sheet, then it slides down, then a sheet with the real error appears.
good work :)
i have one question about restarting the Simulator i have this problem after updating the Xcode to 14.0
every time i run the application i must restart it to run idk what should i do ?
Hey azam, i came up with same approach to centralize error management, however, i am not sure it will work if we present new views with fullscreencover modifier, am i wrong? Should this logic be injected in every, lets find a word, ‘hierarchy flow’ ?
nice