StrictMode class

The checks of AppConfig.strict. Each isolate has its own state. Dox().initialize turns it on or off.

Every warning goes to stderr with a [strict] tag, not to the logger: the logger is off by default. A warning never throws.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

enabled ↔ bool
true when AppConfig.strict.enabled is on. Read on every request, so it is one static bool.
getter/setter pair

Static Methods

checkHandler(RouteData route, Duration took) → void
warn when the sync part of the middleware and controller of route took longer than the limit
checkSyncHash(String name, String instead) → void
warn when a sync Hash method (name, like Hash.make) runs in the web server. instead is the method to use.
configure(StrictConfig config) → void
set the checks from config and forget the old warnings
startWatchdog() → void
Start a timer that notices when the event loop of this isolate was blocked longer than the limit, also after an await. It can not tell which code did it. The server calls it when it listens.
stopWatchdog() → void
stop the timer of startWatchdog

Constants

minWatchdogInterval → const Duration
The watchdog timer never ticks faster than this, so a tiny limit does not spin the event loop.
watchdogQuiet → const Duration
the watchdog warns at most once in this time