51

Re: Error handling

Hello, Kodt, you wrote: monad Focus consists that all arithmetics is fulfilled in a monad, - there conversions easier are not necessary. It is a paradigm subtlety, i.e. a sight at an event, and no more that.)) Dotnetnyj Task - quite to itself a high-grade monad.

52

Re: Error handling

V> Here is how to me to use continuations from mine Future in similar syntax await, ?)) Already in any way. Generally that is possible. Keywords: AsyncMethodBuilder, Awaiter pattern

53

Re: Error handling

Hello, MTD, you wrote: And as usual you process such situations: the Code: separate operation for the file list we tear off a file we write the data it is closed 1. An error: it is not possible to write down a file (there are no rights, the file already is, temporarily there is no communication, the quota came to an end...) 1.1. To stop handling of the list and to throw an exception 1.2. To continue list handling, postponing this error in the list of problems. 1.3. To delete that that it is already made and to return an error operation it is not fulfilled 1.4. Other variant 2. An error: Operation for a separate file was tightened, (instead of seconds for the same files, on hours) 2.1. Not to pay attention to hang. 2.2. To supervise time of handling of the list and to diagnose deviations of speed. 2.3. To add timeout. In a case excess to postpone in the list end. 2.4. Another 3. The postponed error: the file is written successfully down in a system cache, but not on a disk. And here at disk writing wrote down with errors or did not write down generally. 3.1. To hammer 3.2.  system events 3.3. To add procedure of check and  the list 3.4. Another 4. Event: exterior interruption (an operation canceling) 4.1. To interrupt on end of handling of the last file 4.2. To interrupt immediately and to delete the last file 4.3. To interrupt immediately and to delete that that already processed before 4.4. Not to pay attention 4.5. Another 5. Event: an exception in the code (that went not so) 5.1. All to interrupt and throw out further 5.2. To add in the list of problems and to try remaining files in the list 5.3. To try anew from the last file 5.4. Another What of the modern languages allows to process similar situations without complicating the source code superfluous language constructions. In an ideal as in CSS it is specified  where also rules we change behavior by default for the necessary.

54

Re: Error handling

Hello, Jack128, you wrote: V>> Here is how to me to use continuations from mine Future in similar syntax await, ?)) Already in any way. J> Generally that is possible. Keywords: AsyncMethodBuilder, Awaiter pattern it is cool, it is necessary to be indulged at a leisure...

55

Re: Error handling

Hello, DarkEld3r, you wrote: DE> Anyway, Rust does not enter into the list of languages where it is impossible to intercept a panic. Whether also me is still interesting to eat such languages. That on which  it is written. http://joeduffyblog.com/2016/02/07/the-error-model/ Our overall solution was to offer a two-pronged error model. On one hand, you had fail-fast - we called it abandonment - for programming bugs. And on the other hand, you had statically checked exceptions for recoverable errors. The two were very different, both in programming model and the mechanics behind them. Abandonment unapologetically tore down the entire process in an instant, refusing to run any user code while doing so. (Remember, a typical Midori program had many small, lightweight processes.) Exceptions, of course, facilitated recovery, but had deep type system support to aid checking and verification.... <<RSDN@Home 1.0.0 alpha 5 rev. 0>>