#error-handling

[ follow ]
zio
Alvinalexander
1 week ago
JavaScript

ZIO 2: Solution to "ZIO.cond not working" (code not running)

Understanding how ZIO.cond works is crucial for proper error handling in ZIO applications. [ more ]
Alvinalexander
6 days ago
JavaScript

ZIO 2: A ZIO.timeout interrupt example with ZIO.attempt

ZIO.timeout can be used in Scala 3 for adding a timeout to an operation, resulting in a None value if the timeout is triggered. [ more ]
morezio
scala
Alvinalexander
6 days ago
Scala

ZIO 2: Using Either with ZIO in a Scala for-expression

Use ZIO in Scala for-expressions with Either to manage errors effectively. [ more ]
Alvinalexander
5 days ago
Scala

Scala Either type: How to get the value out of an Either

Recommended approaches to extract value from Scala Either: match, fold, getOrElse.
Happy Path Programming: focusing on success case and letting failure case take care of itself. [ more ]
Alvinalexander
3 weeks ago
Data science

ZIO 2: STDOUT and STDERR console output with foldZIO, success, failure

Using ZIO in Scala to handle success and failure cases with foldZIO function for printing information to the console. [ more ]
Medium
1 month ago
Scala

Solving `type mismatch; found : X required: Y` Error in Scala

Understanding 'type mismatch' error in Scala - mismatch between expected and actual data types.
Resolving 'type mismatch' by correcting data type or using type casting. [ more ]
Partial function is very useful
Medium
4 months ago
Scala

Functional Pills # 15- Partial Functions

Partial functions are functions that are not defined for all inputs.
Partial functions can be used to handle specific cases and avoid errors. [ more ]
Medium
4 months ago
Scala

Functional Pills # 15- Partial Functions

Partial functions are functions that are not defined for all inputs.
Partial functions can be used to handle specific cases and avoid errors. [ more ]
morescala
javascript
InfoWorld
3 weeks ago
JavaScript

5 ways to use JavaScript promises

Promises are key for asynchronous code. Simple to create, essential for managing results. Learning to use them enhances programming capabilities. [ more ]
Medium
1 month ago
JavaScript

JavaScript Default Parameters: Unleash Function Flexibility

Default parameters in JavaScript allow setting predefined values for function parameters, enhancing flexibility and avoiding undefined values.
Using default parameters can efficiently handle situations like setting themes, handling null values, and incorporating object destructuring for better function behavior. [ more ]
CodeProject
1 month ago
JavaScript

.Net core razor pages (MVC) SignalR client error message "connection disconnected with error 'websocket is not in the Open state'" handling.

Placing SignalR client side code outside the @section Scripts {} can resolve 'websocket is not in the Open state' error.
The recommended approach is to place JavaScript code in the <head> or end of <body> section to avoid interference with other scripts. [ more ]
morejavascript
Inverse
6 days ago
Artificial intelligence

7 of the Most Popular AI Chatbots, Ranked From Worst to Best

AI assistants market is expanding rapidly with various new contenders like Copilot, ChatGPT, and Claude. Companies are focused on converting research to products. [ more ]
Medium
4 days ago
JavaScript

4 Easy Ways To Find Your JavaScript String Length

A for loop can find string length in JavaScript.
Consider bytes for internationalization & encoding needs.
Handle undefined strings to prevent exceptions.
String length in JavaScript may not reflect Unicode characters accurately. [ more ]
CodeProject
2 days ago
JavaScript

OpenAI Dall-E- Client

Interacting with OpenAI image generation endpoint using VB.NET to create and display images locally without requiring Python or NodeJS. [ more ]
Kilian Valkhof | Front-end & user experience developer
3 weeks ago
JavaScript

The problem with new URL(), and how URL.parse() fixes that | Kilian Valkhof

URL.parse() with URL.canParse() allows for better error handling and readability compared to new URL() construction. [ more ]
CodeProject
2 months ago
JavaScript

Error Handling in the Practical Type System (PTS)

Error-handling is often neglected in software development due to the perception of being less enjoyable and postponed for later.
Good error-handling is crucial for reliable, robust, and user-friendly software despite programmers' aversion towards it. [ more ]
GitHub
2 months ago
JavaScript

GitHub - unadlib/mutability: A JavaScript library for transactional mutable updates

Transactional updates ensure errors prevent partial data corruption.
Mutability library supports transactional mutable updates. [ more ]
Sitepoint
5 months ago
JavaScript

How to use the File System in Node.js - SitePoint

Node.js provides a comprehensive API for reading and writing files
Cross-platform considerations are important when working with files in Node.js
Error handling is crucial when reading and writing files [ more ]
Medium
1 week ago
DevOps

How to Retry Cron Jobs with Cron To Go

Setting up retries for cron jobs using Cron To Go ensures reliability and smooth operations during unexpected errors. [ more ]
Alvinalexander
5 days ago
Scala

ZIO 2: Processing ZIO command line arguments

Scala 3 and ZIO 2 example demonstrates processing command-line arguments in a ZIO 2 application. [ more ]
SoftwareMill
3 weeks ago
Scala

Safe direct-style Scala: Ox 0.1.0 released | SoftwareMill

Ox project 0.1.0 release offers safe direct-style concurrency and resiliency for Scala on the JVM. [ more ]
Medium
5 months ago
Scala

Functional Pills #11 : Try-helping us in Scala's waters!

Try in Scala is a container that encapsulates computations, which may result in an error.
Try allows for elegant error handling by converting exceptions into Failure and providing fallback strategies.
Map, flatMap, and pattern matching are powerful tools for navigating and transforming Try results. [ more ]
Realpython
1 month ago
Python

Using raise for Effective Exceptions - Real Python

Learning how to effectively raise exceptions in Python is crucial for handling errors and developing robust programs. [ more ]
Paddy3118
1 month ago
Python

Finding a sub-list within a list, in Python

Using list.index can simplify the search algorithm for finding a sub-list.
Implementing try-except blocks is necessary when using list.index to handle errors. [ more ]
TechBeamers
3 months ago
Python

IndexError: List Index Out of Range in Python

An 'IndexError: list index out of range' in Python typically occurs when you're trying to access an index in a list that does not exist.
The primary reasons for an IndexError in Python typically revolve around attempting to access an index that does not exist in the given list. [ more ]
Alvinalexander
1 month ago
Java

Java socket timeout: How to set the timeout on a Java socket

Set Java socket timeout using socket.setSoTimeout method for a non-zero timeout period
The timeout must be greater than 0; zero means infinite timeout [ more ]
Medium
2 months ago
Web development

BUILDING A REST API WITH GO AND SQLITE(PART 2)

Implementing CRUD operations in Go with SQLite
Introducing error handling and validation for API functionality [ more ]
JS-Tutorials
5 months ago
Node JS

Solved "Cannot find module 'fs/promises'" in Node.js

The error message "Cannot find module 'fs/promises'" can be ambiguous, particularly in relation to the filesystem (fs) module promises in more modern Node.js versions.
There are several causes for this error, including outdated Node.js versions, outdated npm packages, and incorrect import statements. [ more ]
Medium
2 months ago
Data science

BUILDING A REST API WITH GO AND SQLITE(PART 2)

Implementing CRUD operations for a Blog API with Go and SQLite.
Introducing error handling and validation to ensure API functionality. [ more ]
[ Load more ]