File tree Expand file tree Collapse file tree
python/ql/src/semmle/python Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -293,6 +293,41 @@ module SqlExecution {
293293 }
294294}
295295
296+ /**
297+ * A data-flow node that carries information about an error. Such information should
298+ * rarely be exposed directly to the user.
299+ *
300+ * Extend this class to refine existing API models. If you want to model new APIs,
301+ * extend `ErrorInfoSource::Range` instead.
302+ */
303+ class ErrorInfoSource extends DataFlow:: Node {
304+ ErrorInfoSource:: Range range ;
305+
306+ ErrorInfoSource ( ) { this = range }
307+ }
308+
309+ /** Provides a class for modeling new sources of error information, say via APIs. */
310+ module ErrorInfoSource {
311+ abstract class Range extends DataFlow:: Node { }
312+ }
313+
314+ /**
315+ * A data-flow node that represents the creation or introduction of an exception.
316+ *
317+ * Extend this class to refine existing API models. If you want to model new APIs,
318+ * extend `ExceptionSource::Range` instead.
319+ */
320+ class ExceptionSource extends ErrorInfoSource:: Range {
321+ ExceptionSource:: Range range ;
322+
323+ ExceptionSource ( ) { this = range }
324+ }
325+
326+ /** Provides a class for modeling new sources of exceptions, say via APIs. */
327+ module ExceptionSource {
328+ abstract class Range extends DataFlow:: Node { }
329+ }
330+
296331/** Provides classes for modeling HTTP-related APIs. */
297332module HTTP {
298333 import semmle.python.web.HttpConstants
You can’t perform that action at this time.
0 commit comments