Skip to main content
1 vote
0 answers
12 views

How do I change a measurment unit in a Simscape custom block?

I'm trying to create a custom block in Simscape that convert energy from pressurized water into a torque. Here is my code: component pelton_turbine % Ce composant calcule le couple généré par l'eau ...
Nils Aubague's user avatar
0 votes
1 answer
36 views

.Net Core custom error handling from unauthorized access

I am trying to implement a simple custom error handling page, after went through different approaches online, I have the following code: Statup.cs public void Configure(IApplicationBuilder app, ...
Xiao Han's user avatar
  • 1,024
0 votes
1 answer
64 views

Razorpages - Custom 500 Error Page Not Displaying Even though 403 and 404 pages do

I am trying to implement the following custom error pages in ASP.NET Razor Pages (.Net 8.0): 403 Forbidden 404 Not Found 500 Server Error My error pages are RazorPages pages within a directory ...
Dib's user avatar
  • 2,093
1 vote
0 answers
41 views

Typescript error handling with custom defined errors

So, I just would like to know your opinions on how I'm currently handling errors on my application. First, here's my src/errors/index.ts: interface BaseErrorProperties { name?: string; message: ...
tintin's user avatar
  • 11
0 votes
2 answers
112 views

Creating custom errors in makefile with variables

Ive spent some time reading the GNU make manpages, but cant seem to figure out if what Im trying to achieve is actually possible. Basically I just want to pass variables into info( or error( - but ...
Some O-ne's user avatar
-3 votes
1 answer
58 views

How do I fix the error while trying to use datetime.strptime to convert a string to a datetime object? [closed]

date_str = "2024-04-19 15:30:00" datetime_obj = datetime.strptime(date_str, "%Y-%m-%d %H:%M:%S") I attempted to convert a string to a datetime object using the datetime.strptime() ...
Manisha Chintakindi's user avatar
0 votes
0 answers
80 views

Asp.net core mvc error handling - how to display message prompt when throwing custom exception?

Is there anyway to direct custom exception from server side to be shown as prompt dialog in frontend? I am using c# on backend code. I tried to implement server-side global exception handling ...
Faithful Eli Coronel's user avatar
0 votes
1 answer
120 views

Spring does not return an message in an error response

I have dockerized a SpringBoot application. When the application is running in a container, it does not return an error message in an error response (500). e.g. { "timestamp": ...
VOJAKIS's user avatar
0 votes
1 answer
40 views

Express default error handler not sending response

I am uloading image using multer and then compressing image using gm. While uploading image, I am checking for file type and if its not image, throwing err to global err handler for skipping image ...
RRR's user avatar
  • 799
5 votes
3 answers
11k views

How can I create custom error page for 500 Internal server error in next.js app router?

In the previous versions of next.js and current version with page router, I know that there is an ability to handle it buy only creating a 500.js/jsx/tsx file and export default a react component. but ...
erfun ghodoosi's user avatar
0 votes
0 answers
1k views

How can I access flash messages in Symfony's custom error controller? (Or at least pass information from normal controller to error controller))

I would like to access to flash message in custom framework.error_controller in Symfony (5.4). I have a HomeController where I set this: $request->getSession()->getFlashBag()->set('info','...
user avatar
0 votes
1 answer
270 views

Prompting user for multiple items and calculating total cost in Python

I'm working on a Python program that allows users to place an order by inputting items, one per line, until they press Ctrl+D to end their input. After each input, I want to display the total cost of ...
Tanvi Khokhar's user avatar
-1 votes
1 answer
578 views

Laravel: How to send custom error messages to client from API?

I have a Laravel API that returns JSON responses to the client. By default, Laravel sends error messages in a standard format, such as 422 Unprocessable Entity. However, I want to send custom error ...
HexxonDiv's user avatar
-2 votes
1 answer
234 views

How to remove __main__. in Python error handling

I am trying to generate custom exception in Python. Below is my code. class numerror(Exception): def __init__(self): message = "invalid number" dict = {'nmerror': ...
SanjanaSanju's user avatar
0 votes
0 answers
106 views

Why does my express error handler not work with "fetch" or "xhr" requests?

I have an error-catching wrapper function and a error-handling wrapper function for my route handlers: function catchAsync(func) { return function (res, req, next) { func(req, res, next).catch((err) =&...
James's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
14