lib/angoose.js
function getContext(){
    
    if(!domain.active || !domain.active.context){
        if(this.mockContext) return this.mockContext
        
        logger.error("getContext called but no active domain", domain.active);
        logger.error("Caller is ",   arguments.callee && arguments.callee.caller && arguments.callee.caller.name, arguments.callee && arguments.callee.caller );
        throw "Context not available. This may happen if the code was not originated by Angoose";  
    } 
    
    return domain.active.context;
}
function getContext(){
    
    if(!domain.active || !domain.active.context){
        if(this.mockContext) return this.mockContext
        
        logger.error("getContext called but no active domain", domain.active);
        logger.error("Caller is ",   arguments.callee && arguments.callee.caller && arguments.callee.caller.name, arguments.callee && arguments.callee.caller );
        throw "Context not available. This may happen if the code was not originated by Angoose";  
    } 
    
    return domain.active.context;
}
function getContext ( ) { if ( ! domain . active || ! domain . active . context ) { if ( this . mockContext ) return this . mockContext logger . error ( "getContext called but no active domain" , domain . active ) ; logger . error ( "Caller is " , arguments . callee && arguments . callee . caller && arguments . callee . caller . name , arguments . callee && arguments . callee . caller ) ; throw "Context not available. This may happen if the code was not originated by Angoose" ; } return domain . active . context ; }
** getContext() **  Returns the current execution context.  This methods returns a Context object which allows you to get a reference to the current request object and/or login user's Principal object. If the callee isn't inside Angoose execution context, an error will be thrown. See [Context](Context.html) for more.
** getContext () ** Returns the current execution context . This methods returns a Context object which allows you to get a reference to the current request object and / or login user s Principal object . If the callee isn t inside Angoose execution context an error will be thrown . See [ Context ] ( Context . html ) for more .