def tryload(self, cfgstr=None, on_error='<STR_LIT>'):
cfgstr = self._rectify_cfgstr(cfgstr)<EOL>if self.enabled:<EOL><INDENT>try:<EOL><INDENT>if self.verbose > <NUM_LIT:1>:<EOL><INDENT>self.log('<STR_LIT>'.format(self.fname))<EOL><DEDENT>return self.load(cfgstr)<EOL><DEDENT>except IOError:<EOL><INDENT>if self.verbose > <NUM_LIT:0>:<EOL><INDENT>self.log('<STR_LIT>'.format(self.fname))<EOL><DEDENT><DEDENT>except Exception:<EOL><INDENT>if self.verbose > <NUM_LIT:0>:<EOL><INDENT>self.log('<STR_LIT>')<EOL><DEDENT>if on_error == '<STR_LIT>':<EOL><INDENT>raise<EOL><DEDENT>elif on_error == '<STR_LIT>':<EOL><INDENT>self.clear(cfgstr)<EOL>return None<EOL><DEDENT>else:<EOL><INDENT>raise KeyError('<STR_LIT>'.format(on_error))<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>if self.verbose > <NUM_LIT:1>:<EOL><INDENT>self.log('<STR_LIT>'.format(self.fname))<EOL><DEDENT><DEDENT>return None<EOL>
Like load, but returns None if the load fails due to a cache miss.

Args:
    on_error (str): How to handle non-io errors errors. Either raise,
        which re-raises the exception, or clear which deletes the cache
        and returns None.