Resources.Load does not throw exception if file not found

Dear all,

I am working on a solution to change game settings like used prefabs, materials during runtime. I implemented a gamestate object which will not be deleted between scene change.
At start time of this object, the content is loaded from resource folder.

try
{
 ... 
 tmpDesign.mat1 = Resources.Load("Materials/Blue/mat1", typeof(Material)) as Material;
 ...
}
catch(Exception e)
{
 // Something went wrong, so lets get information about it.
 Debug.Log(e.ToString());
}

Because I am not sure I will forget something to move to the resource folder or rename a resource I want to be sure everything is loaded correctly and found.

A simple test with a wrong filename shows that resources.load doesn’t throw any exception if file not found.

Do i have to check every return value for resources.load ??

Greetings
Pat

Reading the docs turns out to be of great help:

 "Returns the asset at path if it can be found otherwise returns null."

So yes, Resources.Load is not checking for a directory or a file to exist, it just tries and finds it and if not then null.