Example 6-12. Hypothetical use of loadImage as a synchronous function


try {
	var img = loadImage('thesis_defense.png');
	console.log('received image');
} catch (e) {
	console.log('Error occured while loading the image');
	console.log(e);
}