Hi @kunal ,
Azure Functions uses a script host, very similar to JobHost in webjobs, to load all metadata and code files for your function app. When the script host calls your function based off your trigger, the execution of that method should determine the success/failure of the invocation. To report a failure, all one should need to do is raise/re-throw the exception to be caught by the ScriptHost. I would also suggest using ILogger to log errors captured by your function.
Hope this helps.