29
29
#include "Logging.h"
30
30
#include "npruntime_internal.h"
33
#define LOG_NPERROR(err) if (err != NPERR_NO_ERROR) LOG_VERBOSE(Plugins, "%s\n", prettyNameForNPError(err))
34
#define LOG_PLUGIN_NET_ERROR() LOG_VERBOSE(Plugins, "Stream failed due to problems with network, disk I/O, lack of memory, or other problems.\n")
34
static const char* const errorStrings[] = {
35
"No errors occurred.", /* NPERR_NO_ERROR */
36
"Error with no specific error code occurred.", /* NPERR_GENERIC_ERROR */
37
"Invalid instance passed to the plug-in.", /* NPERR_INVALID_INSTANCE_ERROR */
38
"Function table invalid.", /* NPERR_INVALID_FUNCTABLE_ERROR */
39
"Loading of plug-in failed.", /* NPERR_MODULE_LOAD_FAILED_ERROR */
40
"Memory allocation failed.", /* NPERR_OUT_OF_MEMORY_ERROR */
41
"Plug-in missing or invalid.", /* NPERR_INVALID_PLUGIN_ERROR */
42
"Plug-in directory missing or invalid.", /* NPERR_INVALID_PLUGIN_DIR_ERROR */
43
"Versions of plug-in and Communicator do not match.", /* NPERR_INCOMPATIBLE_VERSION_ERROR */
44
"Parameter missing or invalid.", /* NPERR_INVALID_PARAM */
45
"URL missing or invalid.", /* NPERR_INVALID_URL */
46
"File missing or invalid.", /* NPERR_FILE_NOT_FOUND */
47
"Stream contains no data.", /* NPERR_NO_DATA */
48
"Seekable stream expected.", /* NPERR_STREAM_NOT_SEEKABLE */
54
#define LOG_NPERROR(err) if (err != NPERR_NO_ERROR) LOG_VERBOSE(Plugin, "%s\n", errorStrings[err])
55
#define LOG_PLUGIN_NET_ERROR() LOG_VERBOSE(Plugin, "Stream failed due to problems with network, disk I/O, lack of memory, or other problems.\n")
40
const char* prettyNameForNPError(NPError error);
42
CString prettyNameForNPNVariable(NPNVariable variable);
43
CString prettyNameForNPPVariable(NPPVariable variable, void* value);
46
const char* prettyNameForDrawingModel(NPDrawingModel drawingModel);
47
const char* prettyNameForEventModel(NPEventModel eventModel);
50
} // namespace WebCore
52
#endif // !LOG_DISABLED
54
#endif // PluginDebug_h