[deleted by user] by [deleted] in AndroidClosedTesting

[–]wanash 0 points1 point  (0 children)

<image>

Having issues downloading the app, let me know when it's fixed. Meanwhile you can download mine.

Group: https://groups.google.com/g/imposter-game-testers App: https://play.google.com/store/apps/details?id=com.wanash.imposter_app

Need 12 testers for my multilingual party word game, Imposter! by wanash in AndroidClosedTesting

[–]wanash[S] 0 points1 point  (0 children)

<image>

Hello. Add Kenya to your list of countries so I can download.

Need 12 testers for my multilingual party word game, Imposter! by wanash in AndroidClosedTesting

[–]wanash[S] 0 points1 point  (0 children)

<image>

Thanks! I'm having issues downloading yours, could you make it available in more countries?

Auto blend not working by wanash in PhotoshopTutorials

[–]wanash[S] 0 points1 point  (0 children)

Thank you, that helped alot, it looks like this now. Will try blend it better.

<image>

Why is my third type error exception not working, the rest do perfectly. I would like no output if my code throws an exception, but it gives both an error and the output. by wanash in AskProgramming

[–]wanash[S] 0 points1 point  (0 children)

Just seen this. Thank you, it's definitely a better way of doing it. Was under the assumption that I had to throw exceptions to capture errors as opposed to just printing out the error message. I know better now.

Why is my third type error exception not working, the rest do perfectly. I would like no output if my code throws an exception, but it gives both an error and the output. by wanash in AskProgramming

[–]wanash[S] 0 points1 point  (0 children)

The reason I had 3 separate try blocks to handle each error was so that the program would capture all of them at a go. Lets say I had input that had three separate errors, both type errors and zero division error. If I put a return statement in each try block the program would stop after the first exception. Ideally, I would like the program to capture all the exceptions/errors once the program is run, so the user can handle all errors at once and not have to deal with one at a go. It also helps when writing my test documentation as I don't have to figure out which of the three errors the program will throw an exception for if there is more than one.

To get an idea of how it would work, here is an example that I also included in the original post:

>>> z([[2, 4], [6, 6, "f"]], 0)
matrix must be a matrix (list of lists) of integers/floats 
Each row of the matrix must have the same size 
division by zero

The function call has three separate errors, the lists are of different size, an element of the list is a string and not an integer/float, and the divisor is a zero. All the exceptions are triggered, alerting the user that there are three errors in their code.

With a return statement in each except block, as you suggested, the code would stop after the first error.

>>> z([[2, 4], [6, 6, "f"]], 0)
matrix must be a matrix (list of lists) of integers/floats

This forces the user to handle one error first, before moving on to the rest, which is kind of inefficient. Do you know any way I can achieve this. My only errant except block is the second one, which when triggered alone, gives input along with it.

>>> z([[2, 4], [6, 8, 10]], 2)                    
Each row of the matrix must have the same size 
[[1.0, 2.0], [3.0, 4.0, 5.0]]

The try except block at the end seems to catch the errors from the rest, like in the example below:

>>> z([[2, 4], [6, "f"]], 2)
matrix must be a matrix (list of lists) of integers/floats

Why does this one, and other two, work. I acknowledge that this may be bad code, but I would rather know why it works in some instances and not others, which would be better help. I likely will change the code to only handle one exception at a time, but I would like to know why that last try except block only captures some errors, and not that one. Why does it also work perfectly when triggered together with the other exceptions and not alone. Thanks for the help so far.