Friday 2 May 2014

SharePoint Client Object Model stackTrace

SharePoint Client Object Model stackTrace
If you want to find out the Error message and Line number where error is coming.
Use below statements in Fail method.
Ex:
context.executeQueryAsync(onQSuccee, onQFail);
function onQFail(sender, args) {
alert('Request has failed ' + args.get_message() + '\n' + args.get_stackTrace());
}
args.get_message(): will give you error message
args.get_stackTrace(): Error details with line number..