Exceptions
EXCEPTION UTILITIES
PS_ERROR_CODES: dict[int:str] = {-2147417846: 'Photoshop is currently busy, close any dialog boxes and stop any pending actions.', -2147023170: 'Unable to make connection with Photoshop, please check the FAQ for solutions.', -2147352565: "Failed to load a PSD template or other file, ensure template file isn't corrupted and that you have allocated enough scratch disk space and RAM to Photoshop.", -2147352567: 'Photoshop does not appear to be installed. If Photoshop is installed, check the FAQ for solutions.', -2147220261: 'Invalid data type passed to action descriptor function.', -2147213497: 'Tried to transform, select, or translate an empty layer.', -2147212704: 'Action descriptor or layer object key/property is missing.', -2147220262: "Photoshop tried to load a PSD template or file that doesn't exist.", -2147220279: 'Wrong type of value passed to a Photoshop object property.', -2147213327: 'Tried to interact with a text layer that is rasterized or has an uninstalled font.', -2147213404: "Tried to delete a layer that doesn't exist."}
module-attribute
EXCEPTION CLASSES
ScryfallError
Bases: Exception
Exception representing a failure to retrieve Scryfall data.
Source code in src/utils/exceptions.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
|
get_com_error(signed_int)
Check for an error message for both the signed and unsigned version of a COMError code (HRESULT). @param signed_int: Signed integer representing a COMError exception. @return: The string error message associated with this COMError code.
Source code in src/utils/exceptions.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
get_photoshop_error_message(err)
Gets a user-facing error message based on a given Photoshop access exception. @param err: Exception object containing the reason an action failed. @return: Proper user response for this exception.
Source code in src/utils/exceptions.py
95 96 97 98 99 100 101 102 103 104 105 106 107 |
|