#pragma once

#include <psemek/wgpu/external/webgpu.h>
#include <psemek/util/exception.hpp>

#include <string>
#include <string_view>

namespace psemek::wgpu::detail
{

	inline void check_status(std::string_view caption, WGPUStatus status)
	{
		if (status != WGPUStatus_Success)
			throw util::exception("wgpu error in " + std::string(caption));
	}

}
