logFailedLoads

View sourcelogFailedLoads(world: World): void

Logs the readable failure-event batch published by the asset server.

This function is registered directly in the repeating AppSchedule.Update schedule’s CoreSystems.End system group by AssetServerPlugin. The world must already contain a typed asset-load failure event resource stored under typeidGeneric(Events, [AssetLoadFail]). The system does not create or clear it; AssetServerPlugin stages it through EventPlugin.

Each invocation visits only the batch currently readable by Events#each, in write order. It logs one error per AssetLoadFail using its path and reason. A saving failure is identified by AssetLoadOperation.Saving; every other operation value produces a loading message. The resulting messages have the form AssetServer error loading "path": reason (or saving).

Examples

import { App } from '@wimaengine/app'
import { AssetServerPlugin } from '@wimaengine/asset'
import { CorePlugin } from '@wimaengine/core'
import { ReflectPlugin } from '@wimaengine/reflect'

const app = new App()
app
  .registerPlugin(new ReflectPlugin())
  .registerPlugin(new CorePlugin())
  .registerPlugin(new AssetServerPlugin())
  .setRunner(() => {})
  .run()
// AssetServerPlugin stages Events<AssetLoadFail> and registers this system
// in AppSchedule.Update/CoreSystems.End.

Parameters

NameDescriptionDefault
world

World containing the typed Events<AssetLoadFail> resource.

—

Returns

Nothing; the readable failure batch is left unchanged.