Mercurial > hg > dmlib
comparison src/dmengine.c @ 1261:2bf7cb1e662f
Improve error messages for resource not found situations.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 21 May 2015 13:41:23 +0300 |
parents | 848a88ce7a57 |
children | 4e9deb14e67f |
comparison
equal
deleted
inserted
replaced
1258:13c274d22a29 | 1261:2bf7cb1e662f |
---|---|
331 "Engine not initialized but engineGetResource('%s') called.\n", | 331 "Engine not initialized but engineGetResource('%s') called.\n", |
332 name); | 332 name); |
333 return NULL; | 333 return NULL; |
334 } | 334 } |
335 | 335 |
336 if ((res = dmResourceFind(eng->resources, name)) != NULL && | 336 if ((res = dmResourceFind(eng->resources, name)) != NULL) |
337 res->resData != NULL) | 337 { |
338 return res->resData; | 338 if (res->resData != NULL) |
339 return res->resData; | |
340 | |
341 dmErrorDBGMsg( | |
342 "Could not find resource DATA '%s' (resource was not preloaded).\n", | |
343 name); | |
344 return NULL; | |
345 } | |
339 else | 346 else |
340 { | 347 { |
341 dmErrorDBGMsg( | 348 dmErrorDBGMsg( |
342 "Could not find resource '%s'.\n", | 349 "Could not find resource '%s'.\n", |
343 name); | 350 name); |