Redirects system errors from user-facing return to error log.
This commit is contained in:
parent
c7f041d6d0
commit
13a3fff270
1 changed files with 8 additions and 4 deletions
|
|
@ -920,7 +920,8 @@ class DefaultObject(with_metaclass(TypeclassBase, ObjectDB)):
|
||||||
obj.db.desc = desc
|
obj.db.desc = desc
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
errors.append(str(e))
|
errors.append("An error occurred while creating this '%s' object." % key)
|
||||||
|
logger.log_err(e)
|
||||||
|
|
||||||
return obj, errors
|
return obj, errors
|
||||||
|
|
||||||
|
|
@ -1960,7 +1961,8 @@ class DefaultCharacter(DefaultObject):
|
||||||
obj.db.desc = description if description else "This is a character."
|
obj.db.desc = description if description else "This is a character."
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
errors.append(str(e))
|
errors.append("An error occurred while creating this '%s' object." % key)
|
||||||
|
logger.log_err(e)
|
||||||
|
|
||||||
return obj, errors
|
return obj, errors
|
||||||
|
|
||||||
|
|
@ -2142,7 +2144,8 @@ class DefaultRoom(DefaultObject):
|
||||||
obj.db.desc = description if description else "This is a room."
|
obj.db.desc = description if description else "This is a room."
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
errors.append(str(e))
|
errors.append("An error occurred while creating this '%s' object." % key)
|
||||||
|
logger.log_err(e)
|
||||||
|
|
||||||
return obj, errors
|
return obj, errors
|
||||||
|
|
||||||
|
|
@ -2330,7 +2333,8 @@ class DefaultExit(DefaultObject):
|
||||||
obj.db.desc = description if description else "This is an exit."
|
obj.db.desc = description if description else "This is an exit."
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
errors.append(str(e))
|
errors.append("An error occurred while creating this '%s' object." % key)
|
||||||
|
logger.log_err(e)
|
||||||
|
|
||||||
return obj, errors
|
return obj, errors
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue