mirror of
https://github.com/ente-io/ente.git
synced 2025-08-06 22:52:45 +00:00
12 lines
303 B
TypeScript
12 lines
303 B
TypeScript
import { isDevBuild } from "./env";
|
|
import log from "./log";
|
|
|
|
/**
|
|
* If running in a dev build, throw an exception with the given message.
|
|
* Otherwise log it as a warning.
|
|
*/
|
|
export const assertionFailed = (message: string) => {
|
|
if (isDevBuild) throw new Error(message);
|
|
log.warn(message);
|
|
};
|