MCPcopy Create free account
hub / github.com/KAlO2/PerfectShow / LastErr

Function LastErr

jni/stasm/err.cpp:126–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126const char* LastErr(void) // return the last error message, called by stasm_lasterr
127{
128 if (!err_g[0]) // no error message?
129 {
130 // Should never get here unless someone calls LastErr or
131 // stasm_lasterr incorrectly (i.e. when there has been no error).
132 //
133 // TODO But in fact we do actually get here if cv::fastMalloc fails
134 // (within OpenCV) when allocating a small amount of memory (say 10 bytes,
135 // large amounts are ok). It seems that when there is very little memory
136 // remaining, OpenCV does not handle exceptions properly (an exception
137 // is raised but the OpenCV error callback function is not called).
138 // To reproduce, put the following in your code:
139 // volatile void *p; while (1) p = cv::fastMalloc(10);
140
141 STRCPY(err_g, "Invalid call to LastErr");
142 }
143 return err_g;
144}
145
146void ClearLastErr(void)
147{

Callers 1

stasm_lasterrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected