Error Handling

Error Handling in Rust – Error are a fact of life in Software.

Reading Time: 4 minutes Hello Readers!! Again I am here with an exciting topic that is Error Handling. As we know errors are things that no one wants in their program. So lets see what are Errors and how we can handle them . An error is basically an unexpected behaviour or event that may lead a program to produce undesired output or terminate abruptly. We can try to find Continue Reading

Error Handling in Scala with Option, Try/Catch and Either

Reading Time: 3 minutes Error handling is the process of handling the possibility of failure. For example, failing to read a file and then continuing to use that bad input would clearly be problematic. Noticing and explicitly managing these errors saves the rest of the program from various pitfalls. Exceptions in Scala work the same way as in C++ or Java. When an exception occurs, say an Arithmetic Exception then the Continue Reading

How to Tackle Error in Rust Programming

Reading Time: 3 minutes An Error is basically an unexpected behaviour that may lead a program to produce undesired output or terminate abruptly. Error handling is the process of handling the possibility of failure. In Rust, errors can be classified into two major categories. Recoverable UnRecoverable Recoverable Error Recoverable errors are those that do not cause the program to terminate abruptly. Such as a file not found error . Continue Reading

struct

Different ways for `Error Propagation` in Rust

Reading Time: 2 minutes Error Propagation means the code, that detects the problem, must propagate error information back to the caller function so that it can handle the problem. In the real world, the practice of Error Propagation is necessary. One of the benefits is that your code will look cleaner by simply propagating error information back to the caller that can handle the error and another benefit is Continue Reading

Combinators- A functional approach of error handling in ‘Rust’

Reading Time: 3 minutes In this world, everyone is interested in the spikes whether it is related to professional thing or personal. In this blog, I am going to give you spikes of the programming practices in Rust. Error Handling – process of handling the possibility of failure Today, every programmer is worried whether he has implemented error handling in right manner or not. There are various ways to Continue Reading

Idiomatic Error Handling in Scala

Reading Time: 3 minutes Error handling in Scala can just be written like Java. Put in a little bit of pattern matching magic and you are done. However, given a little use of Scala built-in terrific beauties it can be made much better. Let us have a look. Let us look at a quick example def sayHello(any: Any) = { any match { case x: String => "Hello" case Continue Reading