I am building a custom class with some functions. One of the function is a public Arraylist. The question I am thinking about now is how to best return something to the caller that shows that it failed in a specific way.

What is best:

1. Change the function to a public object or something and return whatever I want.

2. Return an ArrayList containing something that shows how and that it failed.

3. Any other solution?

I'm just too tired to think about this myself