Everything in JSOM is client side. So the exceptions you get are not stored server side.
You can use the on fail method as below to store & check exceptions in the console itself. Check below code snippet :
function getItems(camlQuery){
var context = SP.ClientContext.get_current();
var web = context.get_web();
var list = context.get_web().get_lists().getByTitle('Test');
var items = list.getItems(camlQuery, 'AllItems');
context.load(items);
context.executeQueryAsync(Function.createDelegate(this, onSuccess),
Function.createDelegate(this, onFailure));
}
function onSuccess(sender, args) {
//...success
//execute your code
}
function onFailure(sender, args) {
console.log('Request Failed. ' + args.get_message() + '\n' + args.get_stackTrace());
}
This will give you the error message as well as the stack trace in the console.
To check the message, press F12 (opens developer tools) and click on console tab.
onFailure
method can be used across different functions.