EvEmu
0.8.4
11 September 2021
|
Python object "ccp_exceptions.UserError". More...
#include "PyExceptions.h"
Public Member Functions | |
UserError (const char *exceptionType) | |
UserError & | AddFormatValue (const char *name, PyRep *value) |
Fluent version of the protected AddKeyword, allows for adding a keyword to the exception. More... | |
UserError & | AddDateTime (const char *name, time_t date) |
Shorthand method for adding the given date-time as a datetime string in the message. More... | |
UserError & | AddDate (const char *name, time_t date) |
Shorthand method for adding the given date time as a date string in the message. More... | |
UserError & | AddTime (const char *name, time_t time) |
Shorthand method for adding the given date time as a time string in the message. More... | |
UserError & | AddTimeShort (const char *name, time_t time) |
Shorthand method for adding the given time as a time string in the message (without minutes) More... | |
UserError & | AddA (const char *name, const char *value) |
Shorthand method for adding "a" before the beginning of the value. More... | |
UserError & | AddThe (const char *name, const char *value) |
Shorthand method for adding "the" before the beginning of the value. More... | |
UserError & | AddUELocalization (const char *name, const char *strKey, PyDict *args=nullptr) |
Shorthand method for adding a string in the client's translations. More... | |
UserError & | AddList (const char *name, PyList *listEntries, const char *separator=nullptr) |
Shorthand method for adding a list of format parameters. More... | |
UserError & | AddOwnerName (const char *name, uint32 ownerID) |
Shorthand method for adding an owner's name. More... | |
UserError & | AddOwnerNick (const char *name, uint32 ownerID) |
Shorthand method for adding an owner's nick (first name without surname) More... | |
UserError & | AddLocationName (const char *name, uint32 locationID) |
Shorthand method for adding a location's name. More... | |
UserError & | AddTypeName (const char *name, uint32 typeID) |
Shorthand method for adding a type's name. More... | |
UserError & | AddTypeDescription (const char *name, uint32 typeID) |
Shorthand method for adding a type's description. More... | |
UserError & | AddTypeList (const char *name, PyList *typeIDs) |
Shorthand method for adding a list of types' names. More... | |
UserError & | AddBlueprintTypeName (const char *name, uint32 bpTypeID) |
Shorthand method for adding a blueprint's type name. More... | |
UserError & | AddGroupName (const char *name, uint32 groupID) |
Shorthand method for adding a group's name. More... | |
UserError & | AddGroupDescription (const char *name, uint32 groupID) |
Shorthand method for adding a group's description. More... | |
UserError & | AddCategoryName (const char *name, uint32 categoryID) |
Shorthand method for adding a category's name. More... | |
UserError & | AddCategoryDescription (const char *name, uint32 categoryID) |
Shorthand method for adding a category's description. More... | |
UserError & | AddAmount (const char *name, int quantity) |
Shorthand method for adding a quantity value. More... | |
UserError & | AddAmount (const char *name, uint quantity) |
Shorthand method for adding a quantity value. More... | |
UserError & | AddAmount (const char *name, double quantity) |
Shorthand method for adding a quantity value. More... | |
UserError & | AddISK (const char *name, double isk) |
Shorthand method for adding an ISK amount. More... | |
UserError & | AddAUR (const char *name, double aur) |
Shorthand method for adding an AUR amount. More... | |
UserError & | AddDistance (const char *name, double distance) |
Shorthand method for adding distance in a easy to read unit. More... | |
UserError & | AddTypeIDAndQuantity (const char *name, uint32 typeID, int quantity) |
Shorthand method for adding type ID and quantity. More... | |
![]() | |
PyException (PyRep *except) | |
PyException (const PyException &oth) | |
~PyException () | |
PyException & | operator= (const PyException &oth) |
Protected Member Functions | |
void | AddKeyword (const char *name, PyRep *value) |
Adds keyword to exception. More... | |
UserError & | AddParameterKeyword (const char *name, UserError_ParameterIDs type, PyRep *value, PyRep *value2=nullptr) |
Adds a keyword to exception. More... | |
PyDict * | _GetTupleKeywords () const |
PyDict * | _GetDictKeywords () const |
PyTuple * | _CreateArgs (const char *msg) |
PyDict * | _CreateKeywords (const char *msg) |
Protected Attributes | |
PyTuple * | m_args |
PyDict * | m_keywords |
Static Protected Attributes | |
static const char * | EXCEPTION_NAME = "ccp_exceptions.UserError" |
Additional Inherited Members | |
![]() | |
PyRep * | ssException |
Python object "ccp_exceptions.UserError".
This exception can be used for various errors.
Definition at line 121 of file PyExceptions.h.
UserError::UserError | ( | const char * | exceptionType | ) |
Definition at line 97 of file PyExceptions.cpp.
|
protected |
Definition at line 274 of file PyExceptions.cpp.
References m_args, and PyTuple::SetItem().
|
protected |
Definition at line 284 of file PyExceptions.cpp.
References m_keywords, and PyDict::SetItemString().
|
protected |
Definition at line 269 of file PyExceptions.cpp.
References PyRep::AsDict(), PyDict::GetItemString(), and m_keywords.
Referenced by AddKeyword().
|
protected |
Definition at line 264 of file PyExceptions.cpp.
References PyRep::AsDict(), PyTuple::GetItem(), and m_args.
Referenced by AddKeyword().
UserError & UserError::AddA | ( | const char * | name, |
const char * | value | ||
) |
Shorthand method for adding "a" before the beginning of the value.
Specially useful for things like "you need a Shield hardener" type of messages
[in] | name | The parameter |
[in] | value | The value to display after "a/an" |
Definition at line 141 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_A.
UserError & UserError::AddAmount | ( | const char * | name, |
int | quantity | ||
) |
Shorthand method for adding a quantity value.
[in] | name | The parameter |
[in] | quantity | The quantity for the client to format |
Definition at line 219 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_Amount.
Referenced by StructureSE::Activate(), RamMethods::JobsCheck(), and Inventory::ValidateAddItem().
UserError & UserError::AddAmount | ( | const char * | name, |
uint | quantity | ||
) |
Shorthand method for adding a quantity value.
[in] | name | The parameter |
[in] | quantity | The quantity for the client to format |
Definition at line 224 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_Amount.
UserError & UserError::AddAmount | ( | const char * | name, |
double | quantity | ||
) |
Shorthand method for adding a quantity value.
[in] | name | The parameter |
[in] | amount | The quantity for the client to format |
Definition at line 229 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_Amount.
UserError & UserError::AddAUR | ( | const char * | name, |
double | aur | ||
) |
Shorthand method for adding an AUR amount.
[in] | name | The parameter |
[in] | aur | The AUR quantity for the client to format |
Definition at line 239 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_AUR.
Shorthand method for adding a blueprint's type name.
[in] | name | The parameter |
[in] | typeID | The blueprint's type ID |
Definition at line 194 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_BluePrintTypeName.
Shorthand method for adding a category's description.
[in] | name | The parameter |
[in] | typeID | The category's ID |
Definition at line 214 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_CategoryDescription.
Shorthand method for adding a category's name.
[in] | name | The parameter |
[in] | typeID | The category's ID |
Definition at line 209 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_CategoryName.
UserError & UserError::AddDate | ( | const char * | name, |
time_t | date | ||
) |
Shorthand method for adding the given date time as a date string in the message.
[in] | name | The parameter |
[in] | date | The date in win32 epoch format |
Definition at line 127 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_Date.
UserError & UserError::AddDateTime | ( | const char * | name, |
time_t | date | ||
) |
Shorthand method for adding the given date-time as a datetime string in the message.
[in] | name | The parameter |
[in] | date | The date in win32 epoch format |
Definition at line 122 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_DateTime.
UserError & UserError::AddDistance | ( | const char * | name, |
double | distance | ||
) |
Shorthand method for adding distance in a easy to read unit.
[in] | name | The parameter |
[in] | distance | The distance for the client to format (in meters) |
Definition at line 244 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_Distance.
Fluent version of the protected AddKeyword, allows for adding a keyword to the exception.
Keywords are simple parameters used to replace a specific part of the message string. These parameters are defined in the string itself in the form of %(name)s
[in] | name | The parameter |
[in] | value | The value |
Definition at line 102 of file PyExceptions.cpp.
References AddKeyword().
Referenced by StructureSE::Activate(), AddParameterKeyword(), ActiveModule::CanActivate(), CustomError::CustomError(), CommandDispatcher::Execute(), MarketMgr::ExecuteBuyOrder(), AccountService::HandleCorpTransaction(), ShipItem::LoadCharge(), RamMethods::MaterialSkillsCheck(), RamMethods::ProductionTimeCheck(), ShipItem::TryModuleLimitChecks(), and Inventory::ValidateAddItem().
Shorthand method for adding a group's description.
[in] | name | The parameter |
[in] | typeID | The group's ID |
Definition at line 204 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_GroupDescription.
Shorthand method for adding a group's name.
[in] | name | The parameter |
[in] | typeID | The group's ID |
Definition at line 199 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_GroupName.
UserError & UserError::AddISK | ( | const char * | name, |
double | isk | ||
) |
Shorthand method for adding an ISK amount.
[in] | name | The parameter |
[in] | isk | The ISK quantity for the client to format |
Definition at line 234 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_ISK.
Referenced by Character::AlterBalance(), and AccountService::HandleCorpTransaction().
|
protected |
Adds keyword to exception.
[in] | name | The keyword. |
[in] | value | Value to be associated with the keyword. |
Definition at line 254 of file PyExceptions.cpp.
References _GetDictKeywords(), _GetTupleKeywords(), PyIncRef, and PyDict::SetItemString().
Referenced by AddFormatValue().
UserError & UserError::AddList | ( | const char * | name, |
PyList * | listEntries, | ||
const char * | separator = nullptr |
||
) |
Shorthand method for adding a list of format parameters.
TODO: OFFER A WAY OF GENERATING listEntries AS THAT CAN ALSO HAVE FORMAT PARAMETERS LIKE THE USERERROR CLASS
[in] | name | The parameter |
[in] | listEntries | The list of data to concatenate |
[in] | separator | The separator to use (if any), uses the language's default if not specified |
Definition at line 156 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_List.
Shorthand method for adding a location's name.
[in] | name | The parameter |
[in] | locationID | The location's ID |
Definition at line 174 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_LocationName.
Referenced by RamMethods::ItemLocationCheck(), and Inventory::ValidateAddItem().
Shorthand method for adding an owner's name.
[in] | name | The parameter |
[in] | ownerID | The owner's ID |
Definition at line 164 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_OwnerName.
Referenced by AccountService::HandleCorpTransaction().
Shorthand method for adding an owner's nick (first name without surname)
[in] | name | The parameter |
[in] | ownerID | The owner's ID |
Definition at line 169 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_OwnerNick.
|
protected |
Adds a keyword to exception.
Shorthand method for any of the Add* values
[in] | name | The keyword |
[in] | type | Type of parameter to send |
[in] | value | The parameter's value |
[in] | value2 | The second value (if present) |
Definition at line 109 of file PyExceptions.cpp.
References AddFormatValue(), and PyTuple::SetItem().
Referenced by AddA(), AddAmount(), AddAUR(), AddBlueprintTypeName(), AddCategoryDescription(), AddCategoryName(), AddDate(), AddDateTime(), AddDistance(), AddGroupDescription(), AddGroupName(), AddISK(), AddList(), AddLocationName(), AddOwnerName(), AddOwnerNick(), AddThe(), AddTime(), AddTimeShort(), AddTypeDescription(), AddTypeIDAndQuantity(), AddTypeList(), AddTypeName(), and AddUELocalization().
UserError & UserError::AddThe | ( | const char * | name, |
const char * | value | ||
) |
Shorthand method for adding "the" before the beginning of the value.
[in] | name | The parameter |
[in] | value | The value to display after "the" |
Definition at line 146 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_The.
UserError & UserError::AddTime | ( | const char * | name, |
time_t | time | ||
) |
Shorthand method for adding the given date time as a time string in the message.
[in] | name | The parameter |
[in] | time | The date in win32 epoch format |
Definition at line 132 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_Time.
UserError & UserError::AddTimeShort | ( | const char * | name, |
time_t | time | ||
) |
Shorthand method for adding the given time as a time string in the message (without minutes)
Specially useful when displaying time lapses (like time left for something)
[in] | name | The parameter |
[in] | time | The date in win32 epoch format |
Definition at line 137 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_TimeShort.
Shorthand method for adding a type's description.
[in] | name | The parameter |
[in] | typeID | The type's ID |
Definition at line 184 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_TypeDescription.
Shorthand method for adding type ID and quantity.
[in] | name | The parameter |
[in] | typeID | The type's ID |
[in] | quantity | The quantity |
Definition at line 249 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_TypeIDAndQuantity.
Shorthand method for adding a list of types' names.
[in] | name | The parameter |
[in] | typeIDs | The list of type ids |
Definition at line 189 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_TypeIDList.
Shorthand method for adding a type's name.
[in] | name | The parameter |
[in] | typeID | The type's ID |
Definition at line 179 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_TypeName.
Referenced by ReprocessingServiceBound::GetQuote(), ModuleManager::Online(), and ShipItem::TryModuleLimitChecks().
UserError & UserError::AddUELocalization | ( | const char * | name, |
const char * | strKey, | ||
PyDict * | args = nullptr |
||
) |
Shorthand method for adding a string in the client's translations.
[in] | name | The parameter |
[in] | strKey | The name of the extra MLS string to lookup |
[in] | format | The extra format to apply if any |
Definition at line 151 of file PyExceptions.cpp.
References AddParameterKeyword(), and UserError_Parameter_Localization.
|
staticprotected |
The name of the exception for EVE
Definition at line 413 of file PyExceptions.h.
|
protected |
Definition at line 443 of file PyExceptions.h.
Referenced by _CreateArgs(), and _GetTupleKeywords().
|
protected |
Definition at line 444 of file PyExceptions.h.
Referenced by _CreateKeywords(), and _GetDictKeywords().