Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
64 views

Here's my PowerShell 5.1 script to get service status on all machines. I'm giving each server 5 seconds to respond before moving on. However, it still looks like I'm getting the uncaught messages in ...
Rod's user avatar
  • 15.6k
3 votes
1 answer
102 views

I have the following function that worked until my recent update of the Visual Studio 2022 compiler (17.11.4). The error I get from the compiler is : not all code paths return a value. But which path ...
janci's user avatar
  • 519
0 votes
1 answer
217 views

I have a class using try-catch-finally, and it works well in debug package. But when I turn on MinifyEnable, the app crashed with class verified rejected: java.lang.VerifyError: Verifier rejected ...
Promise's user avatar
1 vote
4 answers
976 views

I know this is bad design and I am trying to find any reason to not do this, so I need some help. I have an API endpoint that is being hit and needs to respond back with an OK response within a few ...
Xerc's user avatar
  • 155
1 vote
0 answers
41 views

I have made the following custom useFetch hook for my Next.js app: import HTTPMethod from "http-method-enum"; import { useState } from "react"; export default function useFetch() {...
Ethan's user avatar
  • 1,868
1 vote
2 answers
5k views

My R code is as follows errors = 0 for(i in c(1:100)){ tryCatch(expr = { API Call }, error = {errors=errors+1}, finally = {}) further code } The code is meant to continue execution even ...
Siddharth Somani's user avatar
4 votes
1 answer
89 views

Sometimes I have a code in try-catch-finally block when finally branch does some cleanup code which may throw an Error. An error in the finally branch suppresses a possible error in the main branch. I ...
xmedeko's user avatar
  • 7,948
-1 votes
1 answer
112 views

try { fruit fr = (fruit) p; System.exit(0); } catch (Exception e) { System.out.println("not the right object"); } finally { System.out.println("finablock"); } ...
Martien ANGEL's user avatar
0 votes
1 answer
129 views

this is my code (which is an infinity while loop. I should implement a try/catch block here, so that it stops, because it's going to infinity. My professor says we should implement a 'OutOfMemoryError'...
commencer548's user avatar
-4 votes
1 answer
94 views

def finding(a,b): try: result=a+b return result except TypeError: return "please type only num" finally: return "this line will get print at ...
Mohit Mishra's user avatar
1 vote
2 answers
438 views

I made a switch case statement menu with one of the options being System.exit(0);. This is all surrounded by a try, finally that calls the method all of this is in. Would you guys not recommend this ...
Seth Buchanan's user avatar
0 votes
1 answer
2k views

Need help to catch the error. Whenever my network connection is unstable my get-ad script will be terminated. $ScriptDir = Split-Path $script:MyInvocation.MyCommand.Path $Date = Get-Date -Format ...
NOBODY519's user avatar
1 vote
0 answers
168 views

I'm sending a base64 string to a backend with axios, but it can only be sent if the string is not over 2MB long. if it's longer than that I want to console.log the error message, but it doesn't work - ...
rozina's user avatar
  • 63
0 votes
1 answer
241 views

import java.util.Scanner; public class userInput { public static void main(String[]args){ try{ Scanner scanner = new Scanner(System.in); String ...
Ilias Matrane's user avatar
0 votes
1 answer
70 views

Guessing the number import java.util.*; public class LabExer5A { public static void main(String args[]) { Scanner Input = new Scanner (System.in); System.out.println(&...
paulo saim's user avatar
2 votes
1 answer
7k views

I am using Files.walk() to get some files from directory stuff but I am getting a warning about blocker bug from Sonarqube and Sonarlint code analysis that Connections, streams, files, and other ...
abidinberkay's user avatar
  • 2,055
0 votes
1 answer
53 views

I'm doing try and catch exercises in JavaScript. here is my code function getTime1() { return new Promise((resolve, reject) => { setTimeout(() => { resolve(11111); }, 1000); ...
helloAl's user avatar
  • 25
1 vote
1 answer
525 views

Java 8 import java.util.zip.GZIPOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; private void createFile(final String json) throws IOException { ...
Alexei's user avatar
  • 16k
1 vote
1 answer
527 views

I have code that includes several initial checks of different parameter values. The code is part of a larger project involving several R scripts as well as calls from other environments. If a ...
AW2's user avatar
  • 83
1 vote
1 answer
189 views

I am using Visual Studio 2019, and I have a piece of code that uses finally block, I have declared a std::string object at the beginning of each Test1(), Test2() and Test3() functions. I put a break ...
TTGroup's user avatar
  • 3,713
0 votes
1 answer
54 views

I have code snippet in java like Int methodHitByAPI() { List returnValue = doSomething(); return returnValue; finishProcess(returnValue); } My doubt is that i wanted to execute ...
Indra Neel's user avatar
0 votes
2 answers
308 views

I want to execute a block of code even if ANY exception is caught in any of the preceding Try/Catch blocks, rather than having Finally blocks after every single Try/Catch. Is this possible to do? ...
user12288009's user avatar
0 votes
2 answers
492 views

I have a usecase , wherein I need to read each line from a csv file : Each line has parameters for a function call. And I call the function for each entry. while(csvReader.readLine != null){ try { ...
59_Varun C U's user avatar
0 votes
0 answers
307 views

If I have multiple Codelines within a Try statement. will it break me out as soon as 1 of them doesn't function?/through an error? and if yes, will it ignore the rest of the code within the try ...
Niklas Pesthy's user avatar
-2 votes
1 answer
427 views

This is my cose: private ResultSetType makeRequest() { try (CloseableHttpResponse response = this.sendRequest(request)) { String responseBody = IOUtils.toString( response....
Jordi's user avatar
  • 23.6k

1
2 3 4 5
9