Packages
vertexcache_sdk
1.0.0
Elixir SDK for VertexCache — Secure, Fast, Multi-Index Caching Client
Current section
Files
Jump to
Current section
Files
sdk/model/vertex_cache_sdk_exception.ex
# ------------------------------------------------------------------------------
# Copyright 2025 to Present, Jason Lam - VertexCache (https://github.com/vertexcache/vertexcache)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ------------------------------------------------------------------------------
defmodule VertexCacheSdk.Model.VertexCacheSdkException do
@moduledoc """
Custom exception for VertexCache SDK, used for consistent cross-SDK error handling.
"""
defexception [:message]
@type t :: %__MODULE__{message: String.t()}
@impl true
def exception(opts) when is_list(opts) do
msg = Keyword.get(opts, :message, "VertexCache SDK error")
%__MODULE__{message: msg}
end
@impl true
def message(%__MODULE__{message: msg}), do: msg
end